user32: Check the active window instead of the foreground to show/hide owned popups.

This commit is contained in:
Alexandre Julliard 2010-05-26 10:39:01 +02:00
parent f26b4f68e7
commit 7ea98f680d
1 changed files with 3 additions and 3 deletions

View File

@ -1548,19 +1548,19 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
break;
case SC_MINIMIZE:
if (hwnd == GetForegroundWindow())
if (hwnd == GetActiveWindow())
ShowOwnedPopups(hwnd,FALSE);
ShowWindow( hwnd, SW_MINIMIZE );
break;
case SC_MAXIMIZE:
if (IsIconic(hwnd) && hwnd == GetForegroundWindow())
if (IsIconic(hwnd) && hwnd == GetActiveWindow())
ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_MAXIMIZE );
break;
case SC_RESTORE:
if (IsIconic(hwnd) && hwnd == GetForegroundWindow())
if (IsIconic(hwnd) && hwnd == GetActiveWindow())
ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_RESTORE );
break;