win32: initialize key state before updating keymap
Based on the MSYS2 0023-gdkkeys-win32.c-fix-initialisation-of-key_state-in-u.patch. Clear the key_state array before using it during keymap updates so stale state cannot affect layout handling, including Japanese IME input.
This commit is contained in:
parent
d181fe8fc3
commit
4d7fc95583
1 changed files with 1 additions and 0 deletions
|
|
@ -692,6 +692,7 @@ update_keymap (GdkKeymap *gdk_keymap)
|
|||
if (hkls_len != keymap->layout_handles->len)
|
||||
keymap->keysym_tab = g_renew (guint, keymap->keysym_tab, keysym_tab_size);
|
||||
|
||||
memset (key_state, 0, sizeof(key_state));
|
||||
memset (keymap->keysym_tab, 0, keysym_tab_size);
|
||||
g_array_set_size (keymap->layout_handles, hkls_len);
|
||||
g_array_set_size (keymap->options, hkls_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue