user32: Add a default GetKeyboardLayout implementation.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f044f401f7
commit
92cbeed9d7
|
@ -208,7 +208,7 @@ static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
|
|||
|
||||
static HKL CDECL nulldrv_GetKeyboardLayout( DWORD thread_id )
|
||||
{
|
||||
return 0;
|
||||
return (HKL)~0; /* use default implementation */
|
||||
}
|
||||
|
||||
static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name )
|
||||
|
|
|
@ -1083,7 +1083,11 @@ UINT WINAPI GetKBCodePage(void)
|
|||
*/
|
||||
HKL WINAPI GetKeyboardLayout(DWORD thread_id)
|
||||
{
|
||||
return USER_Driver->pGetKeyboardLayout(thread_id);
|
||||
HKL layout;
|
||||
|
||||
if ((layout = USER_Driver->pGetKeyboardLayout( thread_id )) != (HKL)~0) return layout;
|
||||
|
||||
return get_locale_kbd_layout();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -878,26 +878,6 @@ UINT CDECL ANDROID_MapVirtualKeyEx( UINT code, UINT maptype, HKL hkl )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ANDROID_GetKeyboardLayout
|
||||
*/
|
||||
HKL CDECL ANDROID_GetKeyboardLayout( DWORD thread_id )
|
||||
{
|
||||
ULONG_PTR layout = GetUserDefaultLCID();
|
||||
LANGID langid;
|
||||
static int once;
|
||||
|
||||
langid = PRIMARYLANGID(LANGIDFROMLCID( layout ));
|
||||
if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
|
||||
layout = MAKELONG( layout, 0xe001 ); /* IME */
|
||||
else
|
||||
layout |= layout << 16;
|
||||
|
||||
if (!once++) FIXME( "returning %lx\n", layout );
|
||||
return (HKL)layout;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ANDROID_VkKeyScanEx
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# USER driver
|
||||
|
||||
@ cdecl GetKeyNameText(long ptr long) ANDROID_GetKeyNameText
|
||||
@ cdecl GetKeyboardLayout(long) ANDROID_GetKeyboardLayout
|
||||
@ cdecl MapVirtualKeyEx(long long long) ANDROID_MapVirtualKeyEx
|
||||
@ cdecl VkKeyScanEx(long long) ANDROID_VkKeyScanEx
|
||||
@ cdecl SetCursor(long) ANDROID_SetCursor
|
||||
|
|
Loading…
Reference in New Issue