Skip to content

clutter/stage: Use an own flag to prevent relayout reentry in the stage

Jonas Dreßler requested to merge verdre/mutter:relayout-fix into main

The CLUTTER_IN_RELAYOUT flag is already set by clutter_actor_allocate_internal() and it's a bad idea to set and unset private flags in two places.

With the introduction of the shallow relayout API we also started setting this flag inside clutter-stage.c on actors that are not the stage, which seems to cause weird warnings because apparently the flag is unset by the stage even though Clutter is still inside a vfunc_allocate() and calling clutter_actor_set_allocation() is still completely valid.

So stop setting those flags in _clutter_stage_maybe_relayout() and instead introduce a new private flag for the stage to prevent reentries during the allocation cycle.

Fixes gnome-shell#2710 (closed)

Edited by Florian Müllner

Merge request reports