From fb0999a1a94562cfb2990d4bbd1faf33f0a433cc Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 29 May 2013 20:51:43 +0200 Subject: [PATCH] keybindings: Make sure events are always reported to the grab window We have no need for normally reported events during grabs. In fact, it might be harmful. A plugin might grab the keyboard through meta_begin_modal_for_plugin() and then expect events to be reported to the grab window they provide. If meanwhile this XIGrabDevice is issued, events might start being reported normally to one other of our windows breaking the plugin event processing. In particular, on an empty workspace, we set input focus to our no_focus_window. Then, if gnome-shell calls meta_begin_modal_for_plugin() and meta_display_freeze_keyboard(), in that order, input events will start being reported to no_focus_window. There are two issues with this. One is that no_focus_window isn't selecting for XI input events and thus the server discards them completely. But even if that is fixed, events being reported to any window other than the one gnome-shell expects - the clutter stage window - means that events will stop reaching it. https://bugzilla.gnome.org/show_bug.cgi?id=701219 --- src/core/keybindings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index baceb6d69..5455344f9 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -1480,7 +1480,7 @@ grab_keyboard (MetaDisplay *display, timestamp, None, grab_mode, grab_mode, - True, /* owner_events */ + False, /* owner_events */ &mask); if (grab_status != Success)