From d18ad16331d1c68ab72a39f7bba77ca1b9a17cda Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 14 Dec 2009 15:10:24 +0100 Subject: [PATCH] winex11: Make GetKeyboardLayoutName() use the same default layout as GetKeyboardLayout(). --- dlls/winex11.drv/keyboard.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 7cf0fdcb176..4d486b00cb7 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1635,16 +1635,11 @@ static HKL get_locale_kbd_layout(void) */ BOOL CDECL X11DRV_GetKeyboardLayoutName(LPWSTR name) { - static const WCHAR formatW[] = {'%','0','8','l','x',0}; + static const WCHAR formatW[] = {'%','0','8','x',0}; DWORD layout; - LANGID langid; - - layout = main_key_tab[kbd_layout].lcid; - /* see comment for get_locale_kbd_layout */ - langid = PRIMARYLANGID(LANGIDFROMLCID(layout)); - if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN) - layout |= 0xe001 << 16; /* FIXME */ + layout = HandleToUlong( get_locale_kbd_layout() ); + if (HIWORD(layout) == LOWORD(layout)) layout = LOWORD(layout); sprintfW(name, formatW, layout); TRACE("returning %s\n", debugstr_w(name)); return TRUE;