From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/input.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 8735dc9fa74..00c627578f7 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1193,6 +1193,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags ) { struct user_thread_info *info = get_user_thread_info(); HKL old_layout; + HWND focus;
TRACE_(keyboard)( "layout %p, flags %x\n", layout, flags );
@@ -1210,7 +1211,12 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
old_layout = info->kbd_layout; info->kbd_layout = layout; - if (old_layout != layout) info->kbd_layout_id = 0; + if (old_layout != layout) + { + info->kbd_layout_id = 0; + if ((focus = get_focus()) && get_window_thread( focus, NULL ) == GetCurrentThreadId()) + send_message( focus, WM_INPUTLANGCHANGE, 0, (LPARAM)layout ); + }
if (!old_layout) return get_locale_kbd_layout(); return old_layout;