Skip to content

wayland/subsurface: Move actor unparenting back to rebuild_surface_tree()

Robert Mader requested to merge rmader/mutter:issue2343 into main

Unparenting the surface actor when the subsurface object is destroyed has several issues:

  • subsurface actors can be unparented while a close animation is still ongoing, breaking the animation for e.g. Firefox.
  • adding and removing the actor to/from the parent is not handled in one place, making the code harder to follow.
  • if the destroyed subsurface had children of its own, they potentially stick around until a surface-tree rebuild. This makes the Firefox hamburger menu not close with the "compositor" backend.

Move the unparenting back to meta_window_actor_wayland_rebuild_surface_tree() and instead just notify the parent of a state change, if it still exist. This will ensure a correct mapping between the subsurface node tree and the flat surface actor list. In case of the closing animation the parent will already be removed and the call is skipped.

Closes #2343 (closed)

Merge request reports