Commit 3898ad40 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Send a WM_ACTIVATE message after restoring a minimized top level window.

The WmShowRestoreMinimizedOverlappedSeq message sequence in tests clearly show that there is a WM_ACTIVATE message at the end of ShowWindow() calls after restoring a minimized window, and it's not from SetFocus(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47507Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d2c2987b
......@@ -1179,7 +1179,13 @@ static BOOL show_window( HWND hwnd, INT cmd )
else WIN_ReleasePtr( wndPtr );
/* if previous state was minimized Windows sets focus to the window */
if (style & WS_MINIMIZE) SetFocus( hwnd );
if (style & WS_MINIMIZE)
{
SetFocus( hwnd );
/* Send a WM_ACTIVATE message for a top level window, even if the window is already active */
if (GetAncestor( hwnd, GA_ROOT ) == hwnd && !(swp & SWP_NOACTIVATE))
SendMessageW( hwnd, WM_ACTIVATE, WA_ACTIVE, 0 );
}
done:
SetThreadDpiAwarenessContext( context );
......
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