Make sure the Focus Out window is still the Foreground window before

doing SetForegroundWindow(0) in Event_FocusOut.
This commit is contained in:
Abey George 1999-10-13 13:49:01 +00:00 committed by Alexandre Julliard
parent d21dde71b3
commit fbecbc2952
1 changed files with 8 additions and 1 deletions

View File

@ -745,7 +745,14 @@ static void EVENT_FocusOut( HWND hWnd, XFocusChangeEvent *event )
else
SendMessageA( hWnd, WM_CANCELMODE, 0, 0 );
WIN_ReleaseWndPtr(pWnd);
SetForegroundWindow( 0 );
/* Abey : 6-Oct-99. Check again if the focus out window is the
Foreground window, because in most cases the messages sent
above must have already changed the foreground window, in which
case we don't have to change the foreground window to 0 */
if (hWnd == GetForegroundWindow())
SetForegroundWindow( 0 );
}
}