From: Ken Thomases Subject: winemac: Send WM_CANCELMODE when keyboard layout changes from Cocoa side. Message-Id: <141ABBAD-88B7-4B64-BDDE-CFC1C6E6EFCC@codeweavers.com> Date: Wed, 23 Oct 2013 20:13:10 -0500 The standard keyboard shortcut for switching the keyboard layout is Command- Space, but the Mac driver never sees the Space key press. So, Wine only sees a press and release of Alt, which puts focus on the menu bar. This prevents that focus change. --- dlls/winemac.drv/keyboard.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c index d4a3090..1fffa22 100644 --- a/dlls/winemac.drv/keyboard.c +++ b/dlls/winemac.drv/keyboard.c @@ -905,6 +905,8 @@ void macdrv_keyboard_changed(const macdrv_event *event) thread_data->dead_key_state = 0; macdrv_compute_keyboard_layout(thread_data); + + SendMessageW(GetActiveWindow(), WM_CANCELMODE, 0, 0); }