From 66e23b009c23b87886139f83b64a506798900ed2 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 2 May 2024 13:21:21 +0200 Subject: [PATCH] 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: --- src/wayland/meta-wayland-subsurface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index 493d76a7a..39132d141 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -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; }