mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Fix redraw queueing in the presence of cloning
We can't short-circuit the emission of ::queue-redraw for not-visible actors, since ClutterClone uses that signal to know when things need to be redrawn. Calling clutter_actor_queue_redraw() out of clutter_actor_real_map() / clutter_actor_real_unmap() was causing the flag state to get set incorrectly from _clutter_actor_set_enable_paint_unmapped(), because a paint queueing a redraw was not expected. Moving queuing the redraw to clutter_actor_hide()/show() fixes this, and also fixes a problem where showing a child of a cloned actor wouldn't cause the clone to be repainted. http://bugzilla.openedhand.com/show_bug.cgi?id=1484 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
abac520f0c
commit
e6a987d670
@ -851,8 +851,6 @@ clutter_actor_real_map (ClutterActor *self)
|
||||
*/
|
||||
g_object_notify (G_OBJECT (self), "mapped");
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
if (CLUTTER_IS_CONTAINER (self))
|
||||
clutter_container_foreach_with_internals (CLUTTER_CONTAINER (self),
|
||||
CLUTTER_CALLBACK (clutter_actor_map),
|
||||
@ -922,8 +920,6 @@ clutter_actor_real_unmap (ClutterActor *self)
|
||||
clutter_stage_set_key_focus (CLUTTER_STAGE (stage), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1011,6 +1007,9 @@ clutter_actor_show (ClutterActor *self)
|
||||
g_object_notify (G_OBJECT (self), "visible");
|
||||
}
|
||||
|
||||
if (priv->parent_actor)
|
||||
clutter_actor_queue_redraw (priv->parent_actor);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
|
||||
@ -1091,6 +1090,9 @@ clutter_actor_hide (ClutterActor *self)
|
||||
g_object_notify (G_OBJECT (self), "visible");
|
||||
}
|
||||
|
||||
if (priv->parent_actor)
|
||||
clutter_actor_queue_redraw (priv->parent_actor);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
|
||||
@ -1589,10 +1591,6 @@ static void
|
||||
clutter_actor_queue_redraw_with_origin (ClutterActor *self,
|
||||
ClutterActor *origin)
|
||||
{
|
||||
/* short-circuit the trivial case */
|
||||
if (!CLUTTER_ACTOR_IS_MAPPED(self))
|
||||
return;
|
||||
|
||||
/* already queued since last paint() */
|
||||
if (self->priv->queued_redraw)
|
||||
return;
|
||||
@ -1607,10 +1605,6 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
|
||||
{
|
||||
ClutterActor *parent;
|
||||
|
||||
/* short-circuit the trivial case */
|
||||
if (!CLUTTER_ACTOR_IS_MAPPED (self))
|
||||
return;
|
||||
|
||||
/* already queued since last paint() */
|
||||
if (self->priv->queued_redraw)
|
||||
return;
|
||||
@ -1620,6 +1614,13 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
|
||||
: G_OBJECT_TYPE_NAME (self));
|
||||
self->priv->queued_redraw = TRUE;
|
||||
|
||||
/* If the actor isn't visible, we still had to emit the signal
|
||||
* to allow for a ClutterClone, but the appearance of the parent
|
||||
* won't change so we don't have to propagate up the hierarchy.
|
||||
*/
|
||||
if (!CLUTTER_ACTOR_IS_VISIBLE (self))
|
||||
return;
|
||||
|
||||
/* notify parents, if they are all visible eventually we'll
|
||||
* queue redraw on the stage, which queues the redraw idle.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user