Skip to content

Commit

Permalink
winex11: Don't send WM_CANCELMODE to iconified windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
julliard committed Sep 14, 2022
1 parent 2784c1c commit f3eebcf
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dlls/user32/tests/msg.c
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion dlls/winex11.drv/event.c
Original file line number Diff line number Diff line change
@@ -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 */

0 comments on commit f3eebcf

Please sign in to comment.