[PATCH] user32: Don't check active window state when handling SC_MINIMIZE/SC_MAXIMIZE/SC_RESTORE.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Oct 13 05:26:43 CDT 2021
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 at baikal.ru>
---
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;
--
2.31.1
More information about the wine-devel
mailing list