summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-keyboard.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-11-01 11:03:18 +0800
committerJonas Ådahl <jadahl@gmail.com>2017-11-02 12:10:10 +0800
commitb6200ac3ff6dd7279f5de3869111cee54c5c7174 (patch)
tree581c5d6c76eda653b6c5c0da4d84255a9afd2f56 /src/wayland/meta-wayland-keyboard.c
parent626621a53a691ebc41c41d4e3ad8ff02476521b9 (diff)
downloadmutter-b6200ac3ff6dd7279f5de3869111cee54c5c7174.tar.gz
wayland/keyboard: Don't transfer layout group when replacing xkb state
The layout group determines what actual keyboard layout in the keymap to use when translating modifier state and key codes to key syms. When changing a keymap to another, the layout groups has no relation to the layout groups in the old keymap, thus there is no reason to transfer it to the new state. This fixes an issue where the xkb state in meta-wayland-keyboard.c got desynchronized with the xkb state in clutter-device-manager-evdev.c. https://bugzilla.gnome.org/show_bug.cgi?id=789300
Diffstat (limited to 'src/wayland/meta-wayland-keyboard.c')
-rw-r--r--src/wayland/meta-wayland-keyboard.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index f8042dc65..a6c861906 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -478,23 +478,24 @@ static void
meta_wayland_keyboard_update_xkb_state (MetaWaylandKeyboard *keyboard)
{
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
- xkb_mod_mask_t latched, locked, group;
+ xkb_mod_mask_t latched, locked;
/* Preserve latched/locked modifiers state */
if (xkb_info->state)
{
latched = xkb_state_serialize_mods (xkb_info->state, XKB_STATE_MODS_LATCHED);
locked = xkb_state_serialize_mods (xkb_info->state, XKB_STATE_MODS_LOCKED);
- group = xkb_state_serialize_layout (xkb_info->state, XKB_STATE_LAYOUT_EFFECTIVE);
xkb_state_unref (xkb_info->state);
}
else
- latched = locked = group = 0;
+ {
+ latched = locked = 0;
+ }
xkb_info->state = xkb_state_new (xkb_info->keymap);
- if (latched || locked || group)
- xkb_state_update_mask (xkb_info->state, 0, latched, locked, 0, 0, group);
+ if (latched || locked)
+ xkb_state_update_mask (xkb_info->state, 0, latched, locked, 0, 0, 0);
}
static void