diff --git a/src/host/ConsoleArguments.cpp b/src/host/ConsoleArguments.cpp index f89bf249732..2541cc8ab82 100644 --- a/src/host/ConsoleArguments.cpp +++ b/src/host/ConsoleArguments.cpp @@ -25,6 +25,12 @@ const std::wstring_view ConsoleArguments::FEATURE_ARG = L"--feature"; const std::wstring_view ConsoleArguments::FEATURE_PTY_ARG = L"pty"; const std::wstring_view ConsoleArguments::COM_SERVER_ARG = L"-Embedding"; const std::wstring_view ConsoleArguments::PASSTHROUGH_ARG = L"--passthrough"; +// NOTE: Thinking about adding more commandline args that control conpty, for +// the Terminal? Make sure you add them to the commandline in +// ConsoleEstablishHandoff. We use that to initialize the ConsoleArguments for a +// defterm handoff s.t. they behave like a conpty connection that was started by +// the terminal. If you forget them there, the conpty won't obey them, only for +// defterm. std::wstring EscapeArgument(std::wstring_view ac) { diff --git a/src/host/srvinit.cpp b/src/host/srvinit.cpp index c7a84116a5e..a7ce2e1e7c2 100644 --- a/src/host/srvinit.cpp +++ b/src/host/srvinit.cpp @@ -536,7 +536,12 @@ try outPipeTheirSide.reset(); signalPipeTheirSide.reset(); - const auto commandLine = fmt::format(FMT_COMPILE(L" --headless --signal {:#x}"), (int64_t)signalPipeOurSide.release()); + // GH#13211 - Make sure we request win32input mode and that the terminal + // obeys the resizing quirk. Otherwise, defterm connections to the Terminal + // are going to have weird resizing, and aren't going to send full fidelity + // input messages. + const auto commandLine = fmt::format(FMT_COMPILE(L" --headless --resizeQuirk --win32input --signal {:#x}"), + (int64_t)signalPipeOurSide.release()); ConsoleArguments consoleArgs(commandLine, inPipeOurSide.release(), outPipeOurSide.release()); RETURN_IF_FAILED(consoleArgs.ParseCommandline());