Module: wine Branch: master Commit: d12dda395f498045edb44a6597cb4a482d27beaa URL: https://gitlab.winehq.org/wine/wine/-/commit/d12dda395f498045edb44a6597cb4a4...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Mar 3 17:06:24 2023 +0100
win32u: Keep the current user locale when enumerating layouts.
The low word of the enumerated HKL is the desired user locale, the high word is either the keyboard layout LANGID, or the keyboard "Layout Id" for additional layouts with the same LANGID.
---
dlls/win32u/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index c11d542037d..8f71f93e0fe 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1273,10 +1273,10 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts ) tmp = wcstoul( key_info->Name, NULL, 16 ); if (query_reg_ascii_value( subkey, "Layout Id", value_info, sizeof(buffer) ) && value_info->Type == REG_SZ) - tmp = MAKELONG( LOWORD( tmp ), - 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff) ); + tmp = 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff); NtClose( subkey );
+ tmp = MAKELONG( LOWORD( layout ), LOWORD( tmp ) ); if (layout == UlongToHandle( tmp )) continue;
count++;