Commit b1d273bb authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Move clip_fullscreen_window foreground check inside it.

parent 3cca65e3
......@@ -782,7 +782,7 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
if (use_take_focus)
{
if (hwnd == NtUserGetForegroundWindow()) clip_fullscreen_window( hwnd, FALSE );
clip_fullscreen_window( hwnd, FALSE );
return TRUE;
}
......
......@@ -500,6 +500,8 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
BOOL fullscreen;
if (hwnd == NtUserGetDesktopWindow()) return FALSE;
if (hwnd != NtUserGetForegroundWindow()) return FALSE;
style = NtUserGetWindowLongW( hwnd, GWL_STYLE );
if (!(style & WS_VISIBLE)) return FALSE;
if ((style & (WS_POPUP | WS_CHILD)) == WS_CHILD) return FALSE;
......@@ -628,12 +630,8 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
last_cursor_change = input->u.mi.time;
}
if (hwnd != NtUserGetDesktopWindow())
{
hwnd = NtUserGetAncestor( hwnd, GA_ROOT );
if ((input->u.mi.dwFlags & (MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_RIGHTDOWN)) && hwnd == NtUserGetForegroundWindow())
if (input->u.mi.dwFlags & (MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_RIGHTDOWN))
clip_fullscreen_window( hwnd, FALSE );
}
/* update the wine server Z-order */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment