1
0
Fork 0

wayland/subsurface: Reset position to (0, 0) in permanent unmap helper

To make sure a new wl_subsurface created for the same wl_surface won't
inherit the position from the wl_subsurface being destroyed.

v2:
* Move into permanently_unmap_subsurface

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3364>
This commit is contained in:
Michel Dänzer 2023-11-01 16:25:54 +01:00 committed by Marge Bot
parent 9dc5d98607
commit cdfc8cf967

View file

@ -409,6 +409,7 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
transaction = meta_wayland_transaction_new (surface->compositor);
meta_wayland_transaction_add_placement_op (transaction,
surface->protocol_state.parent, op);
meta_wayland_transaction_add_subsurface_position (transaction, surface, 0, 0);
meta_wayland_transaction_commit (transaction);
surface->protocol_state.parent = NULL;