diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp index 4074139d3a2..82f2d871aa3 100644 --- a/src/host/outputStream.cpp +++ b/src/host/outputStream.cpp @@ -285,7 +285,7 @@ void ConhostInternalGetSet::ShowWindow(bool showOrHide) { const auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation(); const auto hwnd = gci.IsInVtIoMode() ? ServiceLocator::LocatePseudoWindow() : ServiceLocator::LocateConsoleWindow()->GetWindowHandle(); - ::ShowWindow(hwnd, showOrHide ? SW_NORMAL : SW_MINIMIZE); + ::ShowWindow(hwnd, showOrHide ? SW_SHOWNOACTIVATE : SW_MINIMIZE); } // Routine Description: diff --git a/src/interactivity/base/InteractivityFactory.cpp b/src/interactivity/base/InteractivityFactory.cpp index b94b5329c76..69defd28096 100644 --- a/src/interactivity/base/InteractivityFactory.cpp +++ b/src/interactivity/base/InteractivityFactory.cpp @@ -321,7 +321,7 @@ using namespace Microsoft::Console::Interactivity; // windows). Evan K said we should do it this way, and he // definitely knows. const auto windowStyle = WS_OVERLAPPEDWINDOW; - const auto exStyles = WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_LAYERED; + const auto exStyles = WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_LAYERED | WS_EX_NOACTIVATE; // Attempt to create window. hwnd = CreateWindowExW(exStyles,