[PATCH v4 4/4] explorer: Activate window when restoring from iconic state.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- programs/explorer/systray.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index f9e6661af4..92bc4600db 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -676,6 +676,8 @@ static void click_taskbar_button( HWND button ) if (IsIconic( hwnd )) { + if (IsWindowVisible( hwnd )) + SetActiveWindow( hwnd ); SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 ); return; } -- 2.20.1
Zhiyi Zhang <zzhang(a)codeweavers.com> writes:
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- programs/explorer/systray.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index f9e6661af4..92bc4600db 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -676,6 +676,8 @@ static void click_taskbar_button( HWND button )
if (IsIconic( hwnd )) { + if (IsWindowVisible( hwnd )) + SetActiveWindow( hwnd ); SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
SetActiveWindow() acts on the current thread queue, I don't think that this will do what you want. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Zhiyi Zhang