After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701219 - keybindings: Make sure events are always reported to the grab window
keybindings: Make sure events are always reported to the grab window
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-29 19:36 UTC by Rui Matos
Modified: 2013-06-08 09:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keybindings: Make sure events are always reported to the grab window (1.81 KB, patch)
2013-05-29 19:36 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-05-29 19:36:07 UTC
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.
Comment 1 Rui Matos 2013-05-29 19:36:10 UTC
Created attachment 245582 [details] [review]
keybindings: Make sure events are always reported to the grab window
Comment 2 Florian Müllner 2013-05-29 19:40:01 UTC
Review of attachment 245582 [details] [review]:

Makes sense to me, thanks for investigating!
Comment 3 Rui Matos 2013-05-29 19:47:18 UTC
Attachment 245582 [details] pushed as fb0999a - keybindings: Make sure events are always reported to the grab window