mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
Only reset the relayout_pending flag when actually doing a relayout
If an actor is (unfortunately) queuing a relayout in relayout, you would end up with (ClutterActor*)stage->needs_allocation set to TRUE and stage->relayout_pending set to TRUE. But if then in the same cycle, an actor calls clutter_actor_get_allocation_box, that will trigger another (recursive) _clutter_stage_maybe_relayout, which will wrongly reset the relayout pending to FALSE, while not actually performing a new relayout because of the re-entrancy protection. http://bugzilla.clutter-project.org/show_bug.cgi?id=2503
This commit is contained in:
parent
b6558c5a18
commit
c95cc8d477
@ -761,11 +761,12 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
|
||||
|
||||
if (!priv->relayout_pending)
|
||||
return;
|
||||
priv->relayout_pending = FALSE;
|
||||
|
||||
/* avoid reentrancy */
|
||||
if (!CLUTTER_ACTOR_IN_RELAYOUT (stage))
|
||||
{
|
||||
priv->relayout_pending = FALSE;
|
||||
|
||||
CLUTTER_TIMER_START (_clutter_uprof_context, relayout_timer);
|
||||
CLUTTER_NOTE (ACTOR, "Recomputing layout");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user