winemac: Actually switch Win32 focus away from a window that has lost Cocoa focus.

This commit is contained in:
Ken Thomases 2013-06-06 19:44:11 -05:00 committed by Alexandre Julliard
parent 220b8b7946
commit e635952459
1 changed files with 4 additions and 0 deletions

View File

@ -1587,7 +1587,11 @@ void macdrv_window_lost_focus(HWND hwnd, const macdrv_event *event)
TRACE("win %p/%p fg %p\n", hwnd, event->window, GetForegroundWindow());
if (hwnd == GetForegroundWindow())
{
SendMessageW(hwnd, WM_CANCELMODE, 0, 0);
if (hwnd == GetForegroundWindow())
SetForegroundWindow(GetDesktopWindow());
}
}