diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2015-08-04 15:49:34 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2015-08-04 17:58:39 +0200 |
commit | a6ca56969e85d0f482f86d08abf48aa7ce54012a (patch) | |
tree | 9ae1d826113a71bcd49094a8aa586972a7d9eb74 | |
parent | 56d39241a90c19ed37686b7bd7e3944b32bae94d (diff) | |
download | gtk+-a6ca56969e85d0f482f86d08abf48aa7ce54012a.tar.gz |
gtkmain: Don't process WM events if there's a grab on another toplevel
This is implicitly done for us in the case of grabs on windows from other
groups, but we must perform this check explicitly for grabs with
owner_events=True on windows from the same group, in that case the window
would handle the events as if there was no grab.
https://bugzilla.gnome.org/show_bug.cgi?id=752327
-rw-r--r-- | gtk/gtkmain.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 56400971c3..25fef1cfdf 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1645,8 +1645,13 @@ gtk_main_do_event (GdkEvent *event) (grab_widget && grab_widget != event_widget && !gtk_widget_is_ancestor (event_widget, grab_widget))) { - if (_gtk_window_check_handle_wm_event (event)) - goto cleanup; + /* Ignore event if we got a grab on another toplevel */ + if (!grab_widget || + gtk_widget_get_toplevel (event_widget) == gtk_widget_get_toplevel (grab_widget)) + { + if (_gtk_window_check_handle_wm_event (event)) + goto cleanup; + } } /* Find out the topmost widget where captured event propagation |