[WIN32SS] Make window foreground in SwitchToThisWindow (#995)
[reactos.git] / win32ss / user / ntuser / simplecall.c
index 97879bd..0c9b184 100644 (file)
@@ -521,8 +521,13 @@ NtUserCallTwoParam(
                 {
                     UserPostMessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
                 }
+                /* bring window to top and activate */
+                co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+            }
+            else
+            {
+                UserSetActiveWindow(Window);
             }
-            UserSetActiveWindow(Window);
             break;
         }