On reception of a FocusOut event, don't deactivate the application if the
next window to get the focus is a Wine window.
This commit is contained in:
parent
72526ba4f5
commit
d741850dd8
|
@ -93,6 +93,7 @@ static const char * const event_names[] =
|
||||||
static void CALLBACK EVENT_Flush( ULONG_PTR arg );
|
static void CALLBACK EVENT_Flush( ULONG_PTR arg );
|
||||||
static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg );
|
static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg );
|
||||||
static void EVENT_ProcessEvent( XEvent *event );
|
static void EVENT_ProcessEvent( XEvent *event );
|
||||||
|
BOOL X11DRV_CheckFocus(void);
|
||||||
|
|
||||||
/* Event handlers */
|
/* Event handlers */
|
||||||
static void EVENT_Key( HWND hWnd, XKeyEvent *event );
|
static void EVENT_Key( HWND hWnd, XKeyEvent *event );
|
||||||
|
@ -853,13 +854,19 @@ static void EVENT_FocusOut( HWND hWnd, XFocusChangeEvent *event )
|
||||||
{
|
{
|
||||||
SendMessageA( hWnd, WM_CANCELMODE, 0, 0 );
|
SendMessageA( hWnd, WM_CANCELMODE, 0, 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())
|
/* don't reset the foreground window, if the window who's
|
||||||
SetForegroundWindow( 0 );
|
getting the focus is a Wine window */
|
||||||
|
if (!X11DRV_CheckFocus())
|
||||||
|
{
|
||||||
|
/* 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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue