From 8c63612967d1ac8c905387a4157f5233bbb57176 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 27 Jan 2022 09:27:30 -0600 Subject: [PATCH] This is a simple part of the fix, but not everything We're still hanging, then just dying "gracefully" on startup. More investigation needed. --- src/cascadia/TerminalApp/TerminalPage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp index 6eb29cbfee8..ffc12be9db4 100644 --- a/src/cascadia/TerminalApp/TerminalPage.cpp +++ b/src/cascadia/TerminalApp/TerminalPage.cpp @@ -313,7 +313,10 @@ namespace winrt::TerminalApp::implementation // - true if we're not elevated but all relevant pane-spawning actions are elevated bool TerminalPage::ShouldImmediatelyHandoffToElevated(const CascadiaSettings& settings) const { - if (!_startupActions || IsElevated()) + // GH#12267: Don't forget about defterm handoff here. If we're being + // created for embedding, then _yea_, we don't need to handoff to an + // elevated window. + if (!_startupActions || IsElevated() || _shouldStartInboundListener) { // there arent startup actions, or we're elevated. In that case, go for it. return false;