diff --git a/src/cascadia/WindowsTerminal/IslandWindow.cpp b/src/cascadia/WindowsTerminal/IslandWindow.cpp index 1c959185830..56f5104713a 100644 --- a/src/cascadia/WindowsTerminal/IslandWindow.cpp +++ b/src/cascadia/WindowsTerminal/IslandWindow.cpp @@ -981,7 +981,15 @@ winrt::fire_and_forget IslandWindow::SummonWindow() // restore-down the window. if (IsIconic(_window.get())) { - LOG_IF_WIN32_BOOL_FALSE(ShowWindow(_window.get(), SW_RESTORE)); + // LOG_IF_WIN32_BOOL_FALSE(ShowWindow(_window.get(), SW_RESTORE)); + + // auto success = AnimateWindow(_window.get(), 200, AW_SLIDE | AW_VER_POSITIVE); + // auto success = AnimateWindow(_window.get(), 200, AW_ACTIVATE | AW_SLIDE | AW_VER_POSITIVE); + // if (!success) + // { + // auto gle = GetLastError(); + // gle; + // } } const DWORD windowThreadProcessId = GetWindowThreadProcessId(GetForegroundWindow(), nullptr); const DWORD currentThreadId = GetCurrentThreadId(); @@ -992,11 +1000,22 @@ winrt::fire_and_forget IslandWindow::SummonWindow() LOG_IF_WIN32_BOOL_FALSE(AttachThreadInput(windowThreadProcessId, currentThreadId, false)); }); LOG_IF_WIN32_BOOL_FALSE(BringWindowToTop(_window.get())); - LOG_IF_WIN32_BOOL_FALSE(ShowWindow(_window.get(), SW_SHOW)); - - // Activate the window too. This will force us to the virtual desktop this - // window is on, if it's on another virtual desktop. - LOG_LAST_ERROR_IF_NULL(SetActiveWindow(_window.get())); + // LOG_IF_WIN32_BOOL_FALSE(ShowWindow(_window.get(), SW_SHOW)); + LOG_IF_WIN32_BOOL_FALSE(ShowWindow(_window.get(), SW_HIDE)); + + // // Activate the window too. This will force us to the virtual desktop this + // // window is on, if it's on another virtual desktop. + // LOG_LAST_ERROR_IF_NULL(SetActiveWindow(_window.get())); + // AnimateWindow(_window.get(), 200, AW_ACTIVATE | AW_SLIDE | AW_VER_POSITIVE); + // LOG_IF_WIN32_BOOL_FALSE(AnimateWindow(_window.get(), 200, AW_ACTIVATE | AW_SLIDE | AW_VER_POSITIVE)); + // auto success = AnimateWindow(_window.get(), 200, AW_SLIDE | AW_VER_POSITIVE); + auto success = AnimateWindow(_window.get(), 200, AW_SLIDE | AW_VER_POSITIVE); + // auto success = AnimateWindow(_window.get(), 200, AW_BLEND); // Hey this actually worked with a SW_HIDE right before it + if (!success) + { + auto gle = GetLastError(); + gle; + } } DEFINE_EVENT(IslandWindow, DragRegionClicked, _DragRegionClickedHandlers, winrt::delegate<>);