[gtk/gtk-3-24: 6/8] gdk/win32: Fix group parameter not being used by translate_keyboard_state




commit b3fcfa4bbc0015ac077bf664b87fcdc1800d13b6
Author: Philip Zander <philip zander gmail com>
Date:   Thu Dec 9 12:24:35 2021 +0100

    gdk/win32: Fix group parameter not being used by translate_keyboard_state
    
    gdk_win32_keymap_translate_keyboard_state erroneously used the active
    group rather than the specified group, which caused shortcuts not to
    work in Inkscape when using a Cyrillic layout.

 gdk/win32/gdkkeys-win32.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c
index a5b606ef74..5e725b5cba 100644
--- a/gdk/win32/gdkkeys-win32.c
+++ b/gdk/win32/gdkkeys-win32.c
@@ -986,9 +986,11 @@ gdk_win32_keymap_translate_keyboard_state (GdkKeymap       *gdk_keymap,
 
   keymap = GDK_WIN32_KEYMAP (gdk_keymap);
   update_keymap (keymap);
-  
+
+  g_return_val_if_fail (group >= 0 && group < keymap->layout_infos->len, FALSE);
+
   layout_info = &g_array_index (keymap->layout_infos, GdkWin32KeymapLayoutInfo,
-                                keymap->active_layout);
+                                group);
 
   vk = hardware_keycode;
   mod_bits = gdk_mod_mask_to_mod_bits (state);


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