Prevent multiple keybindings from running simultaneously

pochu27 at gmail.com pochu27 at gmail.com
Wed Nov 27 01:34:31 PST 2013


From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>

The first patch here prevents modifier keybindings from running
while the keyboard is grabbed. This can be seen by going to alt-tab
and then pressing mod before releasing alt. That will call the
exposay binding handler which will then start exposay and take the
keyboard grab, and alt-tab will never notice what happened as its
grab has gone away without cancel being called, causing alt-tab to
leave views around.

We could solve this in other ways depending on what behaviour we actually
want. E.g. we could call weston_keyboard_grab_interface.cancel for the
previous grab when weston_keyboard_start_grab() is called.

The second patch makes exposay work after the above change. Previously
exposay relied on its binding handler being called even when it had the
keyboard grab. Now that that no longer happens, we listen on the
modifiers() handler for mod to be pressed and released. The current
code properly notices when another modifier is pressed before or after
mod (e.g. press mod, press shift, release shift, release mod) but doesn't
notice non-modifier keys (press mod, press a, release a, release mod will
cancel exposay though it shouldn't). Suggestions on how to best do this
are appreciated.

Emilio Pozuelo Monfort (2):
  input: don't run modifier bindings when the kbd is grabbed
  exposay: properly go away when the modifier is pressed

 src/bindings.c |  3 +++
 src/shell.c    | 31 +++++++++++++++++++++++++++----
 2 files changed, 30 insertions(+), 4 deletions(-)

-- 
1.8.4.rc3



More information about the wayland-devel mailing list