mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
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.
This commit is contained in:
parent
bf4ccd21c1
commit
ffaec917e5
@ -1793,7 +1793,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));
|
||||
}
|
||||
@ -1918,8 +1918,10 @@ 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)
|
||||
if (priv->parent != NULL && priv->needs_allocation)
|
||||
clutter_actor_queue_redraw (priv->parent);
|
||||
else
|
||||
clutter_actor_queue_redraw_on_parent (self);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user