[mutter] events: Bypass windows with modal transients
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] events: Bypass windows with modal transients
- Date: Thu, 16 Dec 2021 16:34:35 +0000 (UTC)
commit 3643e0ba1effafe0a8addd53f13ee41ad7227f3e
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Nov 30 18:04:56 2021 +0100
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2123>
src/core/events.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 60fb91233c..a8f854a021 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]