winex11: Make GetKeyboardLayoutName() use the same default layout as GetKeyboardLayout().
This commit is contained in:
parent
8d8544fa15
commit
d18ad16331
|
@ -1635,16 +1635,11 @@ static HKL get_locale_kbd_layout(void)
|
||||||
*/
|
*/
|
||||||
BOOL CDECL X11DRV_GetKeyboardLayoutName(LPWSTR name)
|
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;
|
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);
|
sprintfW(name, formatW, layout);
|
||||||
TRACE("returning %s\n", debugstr_w(name));
|
TRACE("returning %s\n", debugstr_w(name));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue