clutter/actor: Always reset absolute_origin_changed after relayout

Since the introduction of the shallow relayout functionality it's
possible to start an allocation cycle at any point in the tree, not only
at the stage. Now when starting an allocation at an actor that's not the
stage, we'd still look at the absolute_origin_changed property of this
actors parent, which might still be set to TRUE from the parents last
allocation.

So avoid using the parents absolute_origin_changed property from the
last allocation in case a shallow relayout is being done and always
reset the absolute_origin_changed property to FALSE after the allocation
cycle.

This broke with the removal of the ABSOLUTE_ORIGIN_CHANGED
ClutterAllocationFlag that was done in commit dc8e5c7f.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1247
This commit is contained in:
Jonas Dreßler 2020-05-20 20:14:40 +02:00 committed by Jonas Ådahl
parent c823b5ddba
commit 9f121a211d

View File

@ -10165,7 +10165,7 @@ clutter_actor_allocate (ClutterActor *self,
if (!priv->needs_allocation && !stage_allocation_changed)
{
CLUTTER_NOTE (LAYOUT, "No allocation needed");
return;
goto out;
}
if (CLUTTER_ACTOR_IS_MAPPED (self))
@ -10179,12 +10179,15 @@ clutter_actor_allocate (ClutterActor *self,
/* If the actor didn't move but needs_allocation is set, we just
* need to allocate the children */
clutter_actor_allocate_internal (self, &real_allocation);
return;
goto out;
}
_clutter_actor_create_transition (self, obj_props[PROP_ALLOCATION],
&priv->allocation,
&real_allocation);
out:
priv->absolute_origin_changed = FALSE;
}
/**