From 35f0cf26b0225f31d662c834d55997a7a4bf3c59 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Wed, 23 Oct 2013 20:13:10 -0500 Subject: [PATCH] winemac: Send WM_CANCELMODE when keyboard layout changes from Cocoa side. 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 file changed, 2 insertions(+) diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c index d4a3090c46b..1fffa228859 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); }