Commit d12dda39 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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.
parent ab80ee17
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment