From 5ba8a25d2966dc2cdc67a350d4ea6c4ecb293919 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 16 Apr 2016 23:16:12 -0400 Subject: [PATCH] wayland: Fix the map_virtual_modifiers implementation We were not stripping real modifiers out, and thus always thought there's a conflict when the passed in modifiers included any real modifiers. --- gdk/wayland/gdkkeys-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c index d73199f42c..eee2907649 100644 --- a/gdk/wayland/gdkkeys-wayland.c +++ b/gdk/wayland/gdkkeys-wayland.c @@ -420,7 +420,7 @@ gdk_wayland_keymap_map_virtual_modifiers (GdkKeymap *keymap, mods = get_xkb_modifiers (xkb_keymap, *state); xkb_state = xkb_state_new (xkb_keymap); - xkb_state_update_mask (xkb_state, mods, 0, 0, 0, 0, 0); + xkb_state_update_mask (xkb_state, mods & ~0xff, 0, 0, 0, 0, 0); mapped = xkb_state_serialize_mods (xkb_state, XKB_STATE_MODS_EFFECTIVE); if ((mapped & mods & 0xff) != 0) ret = FALSE;