user32: Add current keyboard layout to thread data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fdf568aaae
commit
179c57603a
|
@ -728,8 +728,10 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||
|
||||
case WM_INPUTLANGCHANGE:
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
int count = 0;
|
||||
HWND *win_array = WIN_ListChildren( hwnd );
|
||||
info->kbd_layout = (HKL)lParam;
|
||||
|
||||
if (!win_array)
|
||||
break;
|
||||
|
|
|
@ -1316,6 +1316,7 @@ INT WINAPI ToAsciiEx( UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
|
|||
*/
|
||||
HKL WINAPI ActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
HKL old_layout;
|
||||
|
||||
TRACE_(keyboard)( "layout %p, flags %x\n", layout, flags );
|
||||
|
@ -1330,7 +1331,10 @@ HKL WINAPI ActivateKeyboardLayout( HKL layout, UINT flags )
|
|||
}
|
||||
|
||||
if ((old_layout = USER_Driver->pActivateKeyboardLayout( layout, flags )) != (HKL)~0)
|
||||
{
|
||||
if (old_layout) info->kbd_layout = layout;
|
||||
return old_layout;
|
||||
}
|
||||
|
||||
return get_locale_kbd_layout();
|
||||
}
|
||||
|
|
|
@ -199,6 +199,7 @@ struct user_thread_info
|
|||
DWORD GetMessagePosVal; /* Value for GetMessagePos */
|
||||
ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
|
||||
struct user_key_state_info *key_state; /* Cache of global key state */
|
||||
HKL kbd_layout; /* Current keyboard layout */
|
||||
HWND top_window; /* Desktop window */
|
||||
HWND msg_window; /* HWND_MESSAGE parent window */
|
||||
struct rawinput_thread_data *rawinput; /* RawInput thread local data / buffer */
|
||||
|
|
Loading…
Reference in New Issue