Commit 51d606fa authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Don't check active window state when handling SC_MINIMIZE/SC_MAXIMIZE/SC_RESTORE.

An application I'm working on routes messages to a worker thread, and checking for an active window while processing WM_SYSCOMMAND in that thread breaks things. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b440573d
...@@ -1560,19 +1560,18 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) ...@@ -1560,19 +1560,18 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
break; break;
case SC_MINIMIZE: case SC_MINIMIZE:
if (hwnd == GetActiveWindow()) ShowOwnedPopups(hwnd,FALSE);
ShowOwnedPopups(hwnd,FALSE);
ShowWindow( hwnd, SW_MINIMIZE ); ShowWindow( hwnd, SW_MINIMIZE );
break; break;
case SC_MAXIMIZE: case SC_MAXIMIZE:
if (IsIconic(hwnd) && hwnd == GetActiveWindow()) if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE); ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_MAXIMIZE ); ShowWindow( hwnd, SW_MAXIMIZE );
break; break;
case SC_RESTORE: case SC_RESTORE:
if (IsIconic(hwnd) && hwnd == GetActiveWindow()) if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE); ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_RESTORE ); ShowWindow( hwnd, SW_RESTORE );
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment