[gtk+/gtk-3-22] gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
- Date: Tue, 17 Jan 2017 17:22:30 +0000 (UTC)
commit 4f80d234bf2fb85642d0fe0d63230b07d29d8c10
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Jan 11 19:12:12 2017 +0100
gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.
https://bugzilla.gnome.org/show_bug.cgi?id=770112
gdk/wayland/gdkdevice-wayland.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 2de1daf..9bc3477 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2233,10 +2233,11 @@ keyboard_handle_modifiers (void *data,
keymap = seat->keymap;
direction = gdk_keymap_get_direction (keymap);
xkb_state = _gdk_wayland_keymap_get_xkb_state (keymap);
- seat->key_modifiers = mods_depressed | mods_latched | mods_locked;
xkb_state_update_mask (xkb_state, mods_depressed, mods_latched, mods_locked, group, 0, 0);
+ seat->key_modifiers = gdk_keymap_get_modifier_state (keymap);
+
g_signal_emit_by_name (keymap, "state-changed");
if (direction != gdk_keymap_get_direction (keymap))
g_signal_emit_by_name (keymap, "direction-changed");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]