From e0f0a2ebbfd8c52fd75a8e2440a8d2d1a0bf15b6 Mon Sep 17 00:00:00 2001 From: Joshua Thielen Date: Wed, 24 Oct 2001 02:43:24 +0000 Subject: [PATCH] Switch focus to activated window even if no window previously had the focus. --- windows/winpos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/winpos.c b/windows/winpos.c index f288fcbfaa3..3af64a94455 100644 --- a/windows/winpos.c +++ b/windows/winpos.c @@ -1377,7 +1377,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus) { HWND hOldFocus = PERQDATA_GetFocusWnd( pNewActiveQueue->pQData ); - if ( hOldFocus && GetAncestor( hOldFocus, GA_ROOT ) != hwndActive ) + if ( !hOldFocus || GetAncestor( hOldFocus, GA_ROOT ) != hwndActive ) FOCUS_SwitchFocus( pNewActiveQueue, hOldFocus, (wndPtr && (wndPtr->dwStyle & WS_MINIMIZE))? 0 : hwndActive );