Commit 28dab876 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Activate a hidden window only when explicitely asked by the

application.
parent ac11a68f
...@@ -811,7 +811,8 @@ HWND WINAPI GetActiveWindow(void) ...@@ -811,7 +811,8 @@ HWND WINAPI GetActiveWindow(void)
*/ */
static BOOL WINPOS_CanActivate(WND* pWnd) static BOOL WINPOS_CanActivate(WND* pWnd)
{ {
if( pWnd && !(pWnd->dwStyle & (WS_DISABLED | WS_CHILD)) ) return TRUE; if( pWnd && ( (pWnd->dwStyle & (WS_DISABLED | WS_VISIBLE | WS_CHILD))
== WS_VISIBLE ) ) return TRUE;
return FALSE; return FALSE;
} }
...@@ -834,7 +835,7 @@ HWND WINAPI SetActiveWindow( HWND hwnd ) ...@@ -834,7 +835,7 @@ HWND WINAPI SetActiveWindow( HWND hwnd )
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
MESSAGEQUEUE *pMsgQ = 0, *pCurMsgQ = 0; MESSAGEQUEUE *pMsgQ = 0, *pCurMsgQ = 0;
if ( !WINPOS_CanActivate(wndPtr) ) if (!wndPtr || (wndPtr->dwStyle & (WS_DISABLED | WS_CHILD)))
{ {
prev = 0; prev = 0;
goto end; goto end;
......
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