From 93a9e7f3f4d09b55796a851e308d1f599cf34a7c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 22 Nov 2023 00:32:54 +0100 Subject: [PATCH] core: Move code ignoring events on windows with modals to Wayland This is Wayland specific code, handle it directly in MetaWaylandPointer. This also fixes issues with the crossing event itself managing to reach the window occluded by modals. Part-of: --- src/core/events.c | 1 - src/wayland/meta-wayland-pointer.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/events.c b/src/core/events.c index d9b1a35fb..3f3b550ab 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -475,7 +475,6 @@ meta_display_handle_event (MetaDisplay *display, * trigger ::captured-event handlers along the way. */ bypass_clutter = !IS_GESTURE_EVENT (event_type); - bypass_wayland = meta_window_has_modals (window); meta_window_handle_ungrabbed_event (window, event); diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 7fa54152c..cea0d0735 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -573,6 +573,9 @@ repick_for_event (MetaWaylandPointer *pointer, META_SURFACE_ACTOR_WAYLAND (actor); surface = meta_surface_actor_wayland_get_surface (actor_wayland); + + if (meta_window_has_modals (meta_wayland_surface_get_window (surface))) + surface = NULL; } else {