summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-08-23 11:23:00 -0700
committerEric Anholt <eric@anholt.net>2013-09-03 14:35:39 -0700
commitaa5534ec6931ffcc81cca76b98785d57de8e0e52 (patch)
tree008600d6cb6578c40f2a0c2c054a8f20fe10f848 /hw/kdrive
parent5cc15e1c427bacd73db7381df3474a23f7616624 (diff)
ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl.
Given that the window title says "ctrl+shift", having pressing those keys in that order not ungrab you is fairly mean. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/ephyr/ephyr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 932327dce..d8573e04e 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -1033,9 +1033,12 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev)
if (!keysyms)
keysyms = xcb_key_symbols_alloc(conn);
- if ((xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_L
- || xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_R)
- && (key->state & XCB_MOD_MASK_CONTROL)) {
+ if (((xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_L
+ || xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_R)
+ && (key->state & XCB_MOD_MASK_CONTROL)) ||
+ ((xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Control_L
+ || xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Control_R)
+ && (key->state & XCB_MOD_MASK_SHIFT))) {
KdScreenInfo *screen = screen_from_window(key->event);
EphyrScrPriv *scrpriv = screen->driver;