Skip to content

display: Unmanage windows before compositor

Jonas Ådahl requested to merge jadahl/mutter:wip/switch-unmanage-order into main

Prior to 'compositor: Destroy actors when unmanaging', window actors were destroyed when the compositor object was destroyed, long after the windows were unmanaged, however, when this instead changed to happen when unmanaging, with the original goal to avoid having these actors try to interact with the disposed MetaCompositor instance, it caused an issue where window actors would be indirectly destroyed as a side effect of their parents being destroyed, which caused some fallout in the logic handling window-close animation tracking, which relies on meta_window_actor_queue_destroy() being called before a window actor is actually destroyed.

Fix this by unmanaging windows before unmanaging the compositor.

From an X11 point of view, this should be harmless, since all it really do is call XCompositeUnredirectSubwindows().

For the native backend and the common behavior, all unmanaging the compositor instance does is destroy clutter actors, so doing so after window actors were already cleaned up should not be a problem, as this was the case before too.

Fixes: 35ac3a09 Closes: gnome-shell#5330 (closed)

Merge request reports