https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62da6246899e58582e554…
commit 62da6246899e58582e55432e8039e6da5334d368
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Oct 24 20:02:27 2018 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Oct 24 20:02:27 2018 +0900
[WIN32SS][USER32] Fix SwitchToThisWindow (#929)
I'm not sure but it seems like no one can investigate it. I commit it.
---
win32ss/user/user32/windows/window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/user32/windows/window.c b/win32ss/user/user32/windows/window.c
index 227ab9cb33..048673ff10 100644
--- a/win32ss/user/user32/windows/window.c
+++ b/win32ss/user/user32/windows/window.c
@@ -85,13 +85,13 @@ SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
if (fAltTab)
{
if (IsIconic(hwnd))
- ShowWindowAsync(hwnd, SW_RESTORE);
+ PostMessageW(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hwnd);
}
else
{
hwndFG = GetForegroundWindow();
- ShowWindow(hwnd, SW_RESTORE | SW_SHOWNA);
+ PostMessageW(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetWindowPos(hwnd, hwndFG, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE |
SWP_NOACTIVATE);
SetWindowPos(hwndFG, hwnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}