mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
Handle a clone of an actor with an unmapped parent
If we are cloning an source actor with an unmapped parent, then when we temporarily map the source actor: - We need to skip the check that a mapped actor has a mapped parent. - We need to realize the actor's parents before mapping it, or we'll get an assertion failure in clutter_actor_update_map_state() because an actor with an unmapped parent is !may_be_realized. http://bugzilla.openedhand.com/show_bug.cgi?id=1633 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
d8459b0a32
commit
009eafb9ee
@ -574,19 +574,19 @@ clutter_actor_verify_map_state (ClutterActor *self)
|
||||
}
|
||||
else
|
||||
{
|
||||
ClutterActor *parent = priv->parent_actor;
|
||||
ClutterActor *iter = self;
|
||||
|
||||
/* check for the enable_paint_unmapped flag on any of the
|
||||
* parents; if the flag is enabled at any point of this
|
||||
/* check for the enable_paint_unmapped flag on the actor
|
||||
* and parents; if the flag is enabled at any point of this
|
||||
* branch of the scene graph then all the later checks
|
||||
* become pointless
|
||||
*/
|
||||
while (parent != NULL)
|
||||
while (iter != NULL)
|
||||
{
|
||||
if (parent->priv->enable_paint_unmapped)
|
||||
if (iter->priv->enable_paint_unmapped)
|
||||
return;
|
||||
|
||||
parent = parent->priv->parent_actor;
|
||||
iter = iter->priv->parent_actor;
|
||||
}
|
||||
|
||||
if (!CLUTTER_ACTOR_IS_VISIBLE (priv->parent_actor))
|
||||
@ -8568,10 +8568,20 @@ _clutter_actor_set_enable_paint_unmapped (ClutterActor *self,
|
||||
priv->enable_paint_unmapped = enable;
|
||||
|
||||
if (priv->enable_paint_unmapped)
|
||||
{
|
||||
/* Make sure that the parents of the widget are realized first;
|
||||
* otherwise checks in clutter_actor_update_map_state() will
|
||||
* fail.
|
||||
*/
|
||||
clutter_actor_realize (self);
|
||||
|
||||
clutter_actor_update_map_state (self, MAP_STATE_MAKE_MAPPED);
|
||||
}
|
||||
else
|
||||
{
|
||||
clutter_actor_update_map_state (self, MAP_STATE_MAKE_UNMAPPED);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_anchor_coord_get_units (ClutterActor *self,
|
||||
|
Loading…
Reference in New Issue
Block a user