diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index e4ad1de77d0..4f3bd5630d1 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -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(); diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 542e5a85803..f7dad1298fa 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -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));