diff --git a/reactos/win32ss/user/ntuser/winpos.c b/reactos/win32ss/user/ntuser/winpos.c index ba3fb0e3cb0..bb68c9fc6a7 100644 --- a/reactos/win32ss/user/ntuser/winpos.c +++ b/reactos/win32ss/user/ntuser/winpos.c @@ -2218,11 +2218,15 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd) if ((Cmd == SW_HIDE) || (Cmd == SW_MINIMIZE)) { - if ( ( Wnd->spwndParent == UserGetDesktopWindow() && !ActivateOtherWindowMin(Wnd) ) || - // and Rule #1. - ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) ) + if ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) { - co_WinPosActivateOtherWindow(Wnd); + if ( Wnd->spwndParent == UserGetDesktopWindow()) + { + if(!ActivateOtherWindowMin(Wnd)) + co_WinPosActivateOtherWindow(Wnd); + } + else + co_WinPosActivateOtherWindow(Wnd); } /* Revert focus to parent */