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
This commit is contained in:
Camilla Löwy 2022-03-13 15:57:56 +01:00
parent 46950a5e61
commit 9cc252a406
2 changed files with 2 additions and 9 deletions

View File

@ -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

View File

@ -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)