1
0
Fork 0

wayland: Make subsurface actors unreactive early during destruction

When unmapping a subsurface, it does lose early its connection to the
parent surface. This is however a deciding factor in determining whether
the surface (role) has a window.

Make the subsurface actor unreactive if its connection to the parent
MetaWindow was severed, since it should not be eligible for picking anymore.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3729>
(cherry picked from commit 66e23b009c)
This commit is contained in:
Carlos Garnacho 2024-05-02 13:21:21 +02:00 committed by Jonas Ådahl
parent 523d716e63
commit 2f4dc03451

View file

@ -412,6 +412,7 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
{
MetaWaylandSubsurfacePlacementOp *op;
MetaWaylandTransaction *transaction;
MetaSurfaceActor *surface_actor;
op = get_subsurface_placement_op (surface, NULL,
META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW);
@ -422,6 +423,8 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
meta_wayland_transaction_add_subsurface_position (transaction, surface, 0, 0);
meta_wayland_transaction_commit (transaction);
surface_actor = meta_wayland_surface_get_actor (surface);
clutter_actor_set_reactive (CLUTTER_ACTOR (surface_actor), FALSE);
surface->committed_state.parent = NULL;
}