From 3643e0ba1effafe0a8addd53f13ee41ad7227f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 30 Nov 2021 18:04:56 +0100 Subject: events: Bypass windows with modal transients The expected behavior for modal dialogs is that the user cannot interact with the parent window. However toolkits like GTK and Qt can only implement that behavior for windows within the same process. Address this by enforcing that behavior in the compositor to get "foreign" windows and other toolkits behave consistently. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4825 Part-of: --- src/core/events.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/events.c') diff --git a/src/core/events.c b/src/core/events.c index 60fb91233..a8f854a02 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -420,10 +420,15 @@ meta_display_handle_event (MetaDisplay *display, * See: https://gitlab.gnome.org/GNOME/mutter/issues/88 */ if (meta_window_handle_ui_frame_event (window, event)) - bypass_wayland = (event->type == CLUTTER_BUTTON_PRESS || - event->type == CLUTTER_TOUCH_BEGIN); + { + bypass_wayland = (event->type == CLUTTER_BUTTON_PRESS || + event->type == CLUTTER_TOUCH_BEGIN); + } else - meta_window_handle_ungrabbed_event (window, event); + { + bypass_wayland = meta_window_has_modals (window); + meta_window_handle_ungrabbed_event (window, event); + } /* This might start a grab op. If it does, then filter out the * event, and if it doesn't, replay the event to release our -- cgit v1.2.1