From 11233c51082909332b3ebce28c4ec00697312097 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 12 May 2023 17:24:31 -0500 Subject: [PATCH] Don't even try to MoveContent to the same window you started in (#15325) Don't go. Tracked in #14957 (cherry picked from commit 1324a0148a0a5db8d56415cc9c456df869be89d0) Service-Card-Id: 89180217 Service-Version: 1.18 --- src/cascadia/TerminalApp/TerminalPage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index ce2830e0510..bf4e856a8ce 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -2090,6 +2090,13 @@ namespace winrt::TerminalApp::implementation const auto windowId{ args.Window() }; if (!windowId.empty()) { + // if the windowId is the same as our name, do nothing + if (windowId == WindowProperties().WindowName() || + windowId == winrt::to_hstring(WindowProperties().WindowId())) + { + return true; + } + if (const auto terminalTab{ _GetFocusedTabImpl() }) { auto startupActions = terminalTab->BuildStartupActions(true);