Module: wine Branch: master Commit: 51d606faac8313f1231d921da8868af29dc38a2b URL: https://source.winehq.org/git/wine.git/?a=commit;h=51d606faac8313f1231d921da...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed Oct 13 13:26:43 2021 +0300
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: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/nonclient.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 02e6ad92320..b47616bb639 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -1560,19 +1560,18 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) break;
case SC_MINIMIZE: - if (hwnd == GetActiveWindow()) - ShowOwnedPopups(hwnd,FALSE); + ShowOwnedPopups(hwnd,FALSE); ShowWindow( hwnd, SW_MINIMIZE ); break;
case SC_MAXIMIZE: - if (IsIconic(hwnd) && hwnd == GetActiveWindow()) + if (IsIconic(hwnd)) ShowOwnedPopups(hwnd,TRUE); ShowWindow( hwnd, SW_MAXIMIZE ); break;
case SC_RESTORE: - if (IsIconic(hwnd) && hwnd == GetActiveWindow()) + if (IsIconic(hwnd)) ShowOwnedPopups(hwnd,TRUE); ShowWindow( hwnd, SW_RESTORE ); break;