Activate a hidden window only when explicitely asked by the

application.
oldstable
Gerard Patel 2000-03-26 13:38:15 +00:00 committed by Alexandre Julliard
parent ac11a68f3e
commit 28dab87681
1 changed files with 3 additions and 2 deletions

View File

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