Module: wine Branch: master Commit: f3eebcfa4d4e773313defe851bf99fbe0110e470 URL: https://gitlab.winehq.org/wine/wine/-/commit/f3eebcfa4d4e773313defe851bf99fb...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 14 11:56:02 2022 +0200
winex11: Don't send WM_CANCELMODE to iconified windows.
---
dlls/user32/tests/msg.c | 2 +- dlls/winex11.drv/event.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 610228c3559..6336664199c 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -5572,7 +5572,7 @@ static void test_messages(void)
ShowWindow(hwnd, SW_MINIMIZE); flush_events(); - ok_sequence(WmShowMinOverlappedSeq, "ShowWindow(SW_SHOWMINIMIZED):overlapped", TRUE); + ok_sequence(WmShowMinOverlappedSeq, "ShowWindow(SW_SHOWMINIMIZED):overlapped", FALSE); flush_sequence();
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 25ca9d885a7..4a1a8dc0443 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -837,7 +837,8 @@ static void focus_out( Display *display , HWND hwnd ) return; } if (hwnd != NtUserGetForegroundWindow()) return; - send_message( hwnd, WM_CANCELMODE, 0, 0 ); + if (!(NtUserGetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)) + send_message( hwnd, WM_CANCELMODE, 0, 0 );
/* don't reset the foreground window, if the window which is getting the focus is a Wine window */