From 6553617aa621fbb19dcc3406623ccf096e0334ea Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 10 Aug 2018 21:33:50 +0200 Subject: clutter: Only redraw affected portions on parent widget on show/hide If we are lucky enough and the parent actor has the CLUTTER_ACTOR_NO_LAYOUT flag, we would skip the relayout, but still redraw the parent actor in its entirety. In these cases, we can at least just redraw the area affected by the actor being shown/hidden. --- clutter/clutter/clutter-actor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 97b03fdb5..347a8807a 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -1792,7 +1792,7 @@ clutter_actor_show (ClutterActor *self) g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]); if (priv->parent != NULL) - clutter_actor_queue_redraw (priv->parent); + clutter_actor_queue_redraw (self); g_object_thaw_notify (G_OBJECT (self)); } @@ -1917,8 +1917,7 @@ clutter_actor_hide (ClutterActor *self) g_signal_emit (self, actor_signals[HIDE], 0); g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]); - if (priv->parent != NULL) - clutter_actor_queue_redraw (priv->parent); + clutter_actor_queue_redraw_on_parent (self); g_object_thaw_notify (G_OBJECT (self)); } -- cgit v1.2.1