Commit ed70c76a authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

user32: By default, return all zeroes in the first half of the keyboard layout name.

parent d3fc7dca
......@@ -1284,6 +1284,19 @@ static void test_get_async_key_state(void)
ok(0 == GetAsyncKeyState(-1000000), "GetAsyncKeyState did not return 0\n");
}
static void test_keyboard_layout_name(void)
{
BOOL ret;
char klid[KL_NAMELENGTH];
if (GetKeyboardLayout(0) != (HKL)(ULONG_PTR)0x04090409) return;
klid[0] = 0;
ret = GetKeyboardLayoutNameA(klid);
ok(ret, "GetKeyboardLayoutNameA failed %u\n", GetLastError());
ok(!strcmp(klid, "00000409"), "expected 00000409, got %s\n", klid);
}
START_TEST(input)
{
init_function_pointers();
......@@ -1300,6 +1313,7 @@ START_TEST(input)
test_key_map();
test_ToUnicode();
test_get_async_key_state();
test_keyboard_layout_name();
if(pGetMouseMovePointsEx)
test_GetMouseMovePointsEx();
......
......@@ -1914,8 +1914,6 @@ BOOL CDECL X11DRV_GetKeyboardLayoutName(LPWSTR name)
langid = PRIMARYLANGID(LANGIDFROMLCID(layout));
if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
layout |= 0xe001 << 16; /* FIXME */
else
layout |= layout << 16;
sprintfW(name, formatW, layout);
TRACE("returning %s\n", debugstr_w(name));
......
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