- Fix window activation bug. Patch by Giannis Adamopoulos. See CORE-6889.

svn path=/trunk/; revision=58528
This commit is contained in:
James Tabor 2013-03-16 21:35:48 +00:00
parent 582d211b8f
commit abb74bd965

View file

@ -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 */