To update user32 current keyboard layout as well.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winemac.drv/keyboard.c | 5 +++++ dlls/winemac.drv/macdrv_main.c | 1 + 2 files changed, 6 insertions(+)
diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c index 6732c5755ee..0648b00a4f1 100644 --- a/dlls/winemac.drv/keyboard.c +++ b/dlls/winemac.drv/keyboard.c @@ -1054,6 +1054,8 @@ void macdrv_keyboard_changed(const macdrv_event *event)
macdrv_compute_keyboard_layout(thread_data);
+ ActivateKeyboardLayout(thread_data->active_keyboard_layout, 0); + SendMessageW(GetActiveWindow(), WM_CANCELMODE, 0, 0); }
@@ -1169,6 +1171,9 @@ HKL CDECL macdrv_ActivateKeyboardLayout(HKL hkl, UINT flags)
TRACE("hkl %p flags %04x\n", hkl, flags);
+ if (hkl == thread_data->active_keyboard_layout) + return hkl; + EnterCriticalSection(&layout_list_section); update_layout_list();
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 694a46b11e6..203e993ee93 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -384,6 +384,7 @@ struct macdrv_thread_data *macdrv_init_thread_data(void) set_queue_display_fd(macdrv_get_event_queue_fd(data->queue)); TlsSetValue(thread_data_tls_index, data);
+ ActivateKeyboardLayout(data->active_keyboard_layout, 0); return data; }