Commit 179c5760 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

user32: Add current keyboard layout to thread data.

parent fdf568aa
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment