From 1198fe700a1de6b4d75e3c983845d183e53227e5 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 29 Sep 2022 15:19:24 +0200 Subject: [PATCH] core: Use is_grabbed() method to find existing grabs The whole reason for META_GRAB_OP_WAYLAND_POPUP to exist is to avoid windows from being activatable/movable/resizable when a grabbing xdg_popup is active. Use the meta_display_is_grabbed() method which can tell this from existing MetaWaylandCompositor grabs, so that this remains true after dropping META_GRAB_OP_WAYLAND_POPUP. Part-of: --- src/core/events.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/events.c b/src/core/events.c index 8b3c31641..1f31a1f1a 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -471,7 +471,12 @@ meta_display_handle_event (MetaDisplay *display, bypass_clutter = !IS_GESTURE_EVENT (event); bypass_wayland = meta_window_has_modals (window); - if (display->grab_op == META_GRAB_OP_NONE) + if ( +#ifdef HAVE_WAYLAND + (!wayland_compositor || + !meta_wayland_compositor_is_grabbed (wayland_compositor)) && +#endif + !meta_display_is_grabbed (display)) meta_window_handle_ungrabbed_event (window, event); /* This might start a grab op. If it does, then filter out the