[gtk+] wayland: Make virtual modifier mapping more similar to X



commit 666400881510fa985e246c3e36ad51f4845ec90a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 17 01:50:23 2016 -0400

    wayland: Make virtual modifier mapping more similar to X
    
    Ignore virtual modifiers that are mapped to Mod1 (as Meta
    often is), to avoid interfering with our fix interpretation
    of Mod1 as Alt.

 gdk/wayland/gdkkeys-wayland.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c
index eee2907..2616df4 100644
--- a/gdk/wayland/gdkkeys-wayland.c
+++ b/gdk/wayland/gdkkeys-wayland.c
@@ -398,7 +398,7 @@ gdk_wayland_keymap_add_virtual_modifiers (GdkKeymap       *keymap,
 
       xkb_state_update_mask (xkb_state, 1 << idx, 0, 0, 0, 0, 0);
       real = xkb_state_serialize_mods (xkb_state, XKB_STATE_MODS_EFFECTIVE);
-      real &= 0xff;
+      real &= 0xf0; /* ignore mapping to Lock, Shift, Control, Mod1 */
       if (mods & real)
         *state |= vmods[i].mask;
       xkb_state_update_mask (xkb_state, 0, 0, 0, 0, 0, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]