diff --git a/modules/rostests/apitests/shell32/testlist.c b/modules/rostests/apitests/shell32/testlist.c index a74410e1c25..dad62faf3a6 100644 --- a/modules/rostests/apitests/shell32/testlist.c +++ b/modules/rostests/apitests/shell32/testlist.c @@ -97,7 +97,7 @@ const struct test winetest_testlist[] = { "SHEnumerateUnreadMailAccountsW", func_SHEnumerateUnreadMailAccountsW }, { "She", func_She }, //{ "ShellExec_RunDLL", func_ShellExec_RunDLL }, Broke on Windows - //{ "ShellExecCmdLine", func_ShellExecCmdLine }, Broke on Windows + { "ShellExecCmdLine", func_ShellExecCmdLine }, Broke on Windows //{ "ShellExecuteEx", func_ShellExecuteEx }, Broke on Windows //{ "ShellExecuteW", func_ShellExecuteW }, Broke on Windows { "ShellHook", func_ShellHook }, diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index 1fb5bda74af..dbd7ae2e1db 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -2266,7 +2266,25 @@ co_WinPosSetWindowPos( //ERR("WPSWP : set active window\n"); if (!(Window->state & WNDS_BEINGACTIVATED)) // Inside SAW? { - co_IntSetForegroundWindow(Window); // Fixes SW_HIDE issues. Wine win test_SetActiveWindow & test_SetForegroundWindow. + /* If we have just done this, we do not + * need to do it again. CORE-18799 */ + static PWND LastWin; + static INT LastWinCount; + + if (Window == LastWin) + { + LastWinCount++; + } + else + { + LastWinCount = 0; + LastWin = Window; + } + + if (LastWinCount < 2) + { + co_IntSetForegroundWindow(Window); // Fixes SW_HIDE issues. Wine win test_SetActiveWindow & test_SetForegroundWindow. + } } } }