From 9cc252a406b79c31ab82648a21b715e2d3fc7ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 13 Mar 2022 15:57:56 +0100 Subject: [PATCH] Revert ad01c1b614868c3cbc79306aa6a19c9fc06f34a6 This change broke key names for dead keys, because that depends on the effect on the global state of simulating two key presses. Issue found by CTest tests. Reverts #2018 --- README.md | 2 -- src/win32_init.c | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7560284d..715a5248 100644 --- a/README.md +++ b/README.md @@ -205,8 +205,6 @@ information on what to include when reporting a bug. - [Win32] Bugfix: Content scale queries could fail silently (#1615) - [Win32] Bugfix: Content scales could have garbage values if monitor was recently disconnected (#1615) - - [Win32] Bugfix: Key name update modified global key state on Windows 10 1607 - and later (#2018) - [Win32] Bugfix: A window created maximized and undecorated would cover the whole monitor (#1806) - [Win32] Bugfix: The default restored window position was lost when creating a maximized diff --git a/src/win32_init.c b/src/win32_init.c index 7b468841..ee3dad54 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -460,11 +460,6 @@ void _glfwUpdateKeyNamesWin32(void) { int key; BYTE state[256] = {0}; - UINT flags = 0; - - // Avoid modifying the global key state if supported - if (_glfwIsWindows10Version1607OrGreaterWin32()) - flags = (1 << 2); memset(_glfw.win32.keynames, 0, sizeof(_glfw.win32.keynames)); @@ -494,13 +489,13 @@ void _glfwUpdateKeyNamesWin32(void) length = ToUnicode(vk, scancode, state, chars, sizeof(chars) / sizeof(WCHAR), - flags); + 0); if (length == -1) { length = ToUnicode(vk, scancode, state, chars, sizeof(chars) / sizeof(WCHAR), - flags); + 0); } if (length < 1)