1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-09-29 15:19:24 +02:00 committed by Marge Bot
parent aed3979064
commit 1198fe700a

View file

@ -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