Module: wine Branch: master Commit: 35f0cf26b0225f31d662c834d55997a7a4bf3c59 URL: http://source.winehq.org/git/wine.git/?a=commit;h=35f0cf26b0225f31d662c834d5...
Author: Ken Thomases ken@codeweavers.com Date: Wed Oct 23 20:13:10 2013 -0500
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 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); }