[mutter] clutter/actor: Always reset absolute_origin_changed after relayout



commit 9f121a211dc521862eb5d9a5df17fef8e320410d
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Wed May 20 20:14:40 2020 +0200

    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

 clutter/clutter/clutter-actor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 05d9019628..6dbf3668d7 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -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;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]