Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VtApiRoutines #16954

Merged
merged 5 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions doc/cascadia/profiles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2777,10 +2777,6 @@
"description": "When set to true, prompts will automatically be marked.",
"type": "boolean"
},
"experimental.connection.passthroughMode": {
"description": "When set to true, directs the PTY for this connection to use pass-through mode instead of the original Conhost PTY simulation engine. This is an experimental feature, and its continued existence is not guaranteed.",
"type": "boolean"
},
"experimental.retroTerminalEffect": {
"description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
"type": "boolean"
Expand Down
5 changes: 0 additions & 5 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1277,11 +1277,6 @@ namespace winrt::TerminalApp::implementation
}
}

if constexpr (Feature_VtPassthroughMode::IsEnabled())
{
valueSet.Insert(L"passthroughMode", Windows::Foundation::PropertyValue::CreateBoolean(settings.VtPassthrough()));
}

connection.Initialize(valueSet);

TraceLoggingWrite(
Expand Down
12 changes: 0 additions & 12 deletions src/cascadia/TerminalConnection/ConptyConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
_cols = unbox_prop_or<uint32_t>(settings, L"initialCols", _cols);
_sessionId = unbox_prop_or<winrt::guid>(settings, L"sessionId", _sessionId);
_environment = settings.TryLookup(L"environment").try_as<Windows::Foundation::Collections::ValueSet>();
if constexpr (Feature_VtPassthroughMode::IsEnabled())
{
_passthroughMode = unbox_prop_or<bool>(settings, L"passthroughMode", _passthroughMode);
}
_inheritCursor = unbox_prop_or<bool>(settings, L"inheritCursor", _inheritCursor);
_profileGuid = unbox_prop_or<winrt::guid>(settings, L"profileGuid", _profileGuid);

Expand Down Expand Up @@ -332,14 +328,6 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
flags |= PSEUDOCONSOLE_INHERIT_CURSOR;
}

if constexpr (Feature_VtPassthroughMode::IsEnabled())
{
if (_passthroughMode)
{
WI_SetFlag(flags, PSEUDOCONSOLE_PASSTHROUGH_MODE);
}
}

THROW_IF_FAILED(_CreatePseudoConsoleAndPipes(til::unwrap_coord_size(dimensions), flags, &_inPipe, &_outPipe, &_hPC));

if (_initialParentHwnd != 0)
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalConnection/ConptyConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
til::u8state _u8State{};
std::wstring _u16Str{};
std::array<char, 4096> _buffer{};
bool _passthroughMode{};
bool _inheritCursor{ false };

til::env _initialEnv{};
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalCore/ICoreSettings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace Microsoft.Terminal.Core
Boolean ForceVTInput;
Boolean TrimBlockSelection;
Boolean DetectURLs;
Boolean VtPassthrough;

Windows.Foundation.IReference<Microsoft.Terminal.Core.Color> TabColor;
Windows.Foundation.IReference<Microsoft.Terminal.Core.Color> StartingTabColor;
Expand Down
4 changes: 0 additions & 4 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
return _unfocusedAppearanceViewModel;
}

bool ProfileViewModel::VtPassthroughAvailable() const noexcept
{
return Feature_VtPassthroughMode::IsEnabled() && Feature_VtPassthroughModeSettingInUI::IsEnabled();
}
bool ProfileViewModel::ShowMarksAvailable() const noexcept
{
return Feature_ScrollbarMarks::IsEnabled();
Expand Down
2 changes: 0 additions & 2 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void CreateUnfocusedAppearance();
void DeleteUnfocusedAppearance();

bool VtPassthroughAvailable() const noexcept;
bool ShowMarksAvailable() const noexcept;
bool AutoMarkPromptsAvailable() const noexcept;
bool RepositionCursorWithMouseAvailable() const noexcept;
Expand Down Expand Up @@ -117,7 +116,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
OBSERVABLE_PROJECTED_SETTING(_profile, AltGrAliasing);
OBSERVABLE_PROJECTED_SETTING(_profile, BellStyle);
OBSERVABLE_PROJECTED_SETTING(_profile, Elevate);
OBSERVABLE_PROJECTED_SETTING(_profile, VtPassthrough);
OBSERVABLE_PROJECTED_SETTING(_profile, ReloadEnvironmentVariables);
OBSERVABLE_PROJECTED_SETTING(_profile, RightClickContextMenu);
OBSERVABLE_PROJECTED_SETTING(_profile, ShowMarks);
Expand Down
2 changes: 0 additions & 2 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ namespace Microsoft.Terminal.Settings.Editor
Boolean ShowUnfocusedAppearance { get; };
AppearanceViewModel UnfocusedAppearance { get; };

Boolean VtPassthroughAvailable { get; };
Boolean ShowMarksAvailable { get; };
Boolean AutoMarkPromptsAvailable { get; };
Boolean RepositionCursorWithMouseAvailable { get; };
Expand Down Expand Up @@ -111,7 +110,6 @@ namespace Microsoft.Terminal.Settings.Editor
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AltGrAliasing);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.BellStyle, BellStyle);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, Elevate);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, VtPassthrough);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ReloadEnvironmentVariables);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, RightClickContextMenu);
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ShowMarks);
Expand Down
10 changes: 0 additions & 10 deletions src/cascadia/TerminalSettingsEditor/Profiles_Advanced.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@
</StackPanel>
</local:SettingContainer>

<!-- VtPassthrough -->
<local:SettingContainer x:Uid="Profile_VtPassthrough"
ClearSettingValue="{x:Bind Profile.ClearVtPassthrough}"
HasSettingValue="{x:Bind Profile.HasVtPassthrough, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.VtPassthroughOverrideSource, Mode=OneWay}"
Visibility="{x:Bind Profile.VtPassthroughAvailable}">
<ToggleSwitch IsOn="{x:Bind Profile.VtPassthrough, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>

<!-- RightClickContextMenu -->
<local:SettingContainer x:Uid="Profile_RightClickContextMenu"
ClearSettingValue="{x:Bind Profile.ClearRightClickContextMenu}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1225,10 +1225,6 @@
<value>When enabled, the Terminal will generate a new environment block when creating new tabs or panes with this profile. When disabled, the tab/pane will instead inherit the variables the Terminal was started with.</value>
<comment>A description for what the "Reload environment variables" setting does. Presented near "Profile_ReloadEnvVars".</comment>
</data>
<data name="Profile_VtPassthrough.Header" xml:space="preserve">
<value>Enable experimental virtual terminal passthrough</value>
<comment>An option to enable experimental virtual terminal passthrough connectivity option with the underlying ConPTY</comment>
</data>
<data name="Profile_RightClickContextMenu.Header" xml:space="preserve">
<value>Display a menu on right-click</value>
<comment>This controls how a right-click behaves in the terminal</comment>
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsModel/MTSMSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ Author(s):
X(bool, RightClickContextMenu, "experimental.rightClickContextMenu", false) \
X(Windows::Foundation::Collections::IVector<winrt::hstring>, BellSound, "bellSound", nullptr) \
X(bool, Elevate, "elevate", false) \
X(bool, VtPassthrough, "experimental.connection.passthroughMode", false) \
X(bool, AutoMarkPrompts, "experimental.autoMarkPrompts", false) \
X(bool, ShowMarks, "experimental.showMarksOnScrollbar", false) \
X(bool, RepositionCursorWithMouse, "experimental.repositionCursorWithMouse", false) \
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsModel/Profile.idl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.Control.ScrollbarState, ScrollState);
INHERITABLE_PROFILE_SETTING(String, Padding);
INHERITABLE_PROFILE_SETTING(String, Commandline);
INHERITABLE_PROFILE_SETTING(Boolean, VtPassthrough);

INHERITABLE_PROFILE_SETTING(String, StartingDirectory);
String EvaluatedStartingDirectory { get; };
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsModel/TerminalSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
_Padding = profile.Padding();

_Commandline = profile.Commandline();
_VtPassthrough = profile.VtPassthrough();

_StartingDirectory = profile.EvaluatedStartingDirectory();

Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsModel/TerminalSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
INHERITABLE_SETTING(Model::TerminalSettings, bool, FocusFollowMouse, false);
INHERITABLE_SETTING(Model::TerminalSettings, bool, TrimBlockSelection, true);
INHERITABLE_SETTING(Model::TerminalSettings, bool, DetectURLs, true);
INHERITABLE_SETTING(Model::TerminalSettings, bool, VtPassthrough, false);

INHERITABLE_SETTING(Model::TerminalSettings, Windows::Foundation::IReference<Microsoft::Terminal::Core::Color>, TabColor, nullptr);

Expand Down
1 change: 0 additions & 1 deletion src/cascadia/inc/ControlProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
X(bool, ForceVTInput, false) \
X(winrt::hstring, StartingTitle) \
X(bool, DetectURLs, true) \
X(bool, VtPassthrough, false) \
X(bool, AutoMarkPrompts) \
X(bool, RepositionCursorWithMouse, false)

Expand Down
22 changes: 0 additions & 22 deletions src/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,6 @@
</alwaysDisabledBrandingTokens>
</feature>

<feature>
<name>Feature_VtPassthroughMode</name>
<description>Enables passthrough option per profile in Terminal and ConPTY ability to use passthrough API dispatch engine</description>
<stage>AlwaysDisabled</stage>
<!-- Did it this way instead of "release tokens" to ensure it won't go into Windows Inbox either... -->
<alwaysEnabledBrandingTokens>
<brandingToken>Dev</brandingToken>
<brandingToken>Canary</brandingToken>
<brandingToken>Preview</brandingToken>
</alwaysEnabledBrandingTokens>
</feature>

<feature>
<name>Feature_VtPassthroughModeSettingInUI</name>
<description>Enables the setting gated by Feature_VtPassthroughMode to appear in the UI</description>
<stage>AlwaysDisabled</stage>
<alwaysEnabledBrandingTokens>
<brandingToken>Dev</brandingToken>
<!-- Unlike Feature_VtPassthroughMode, this is not enabled in Preview -->
</alwaysEnabledBrandingTokens>
</feature>

<feature>
<name>Feature_ScrollbarMarks</name>
<description>Enables the experimental scrollbar marks feature.</description>
Expand Down
12 changes: 0 additions & 12 deletions src/host/ConsoleArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const std::wstring_view ConsoleArguments::RESIZE_QUIRK = L"--resizeQuirk";
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
Expand Down Expand Up @@ -467,12 +466,6 @@ void ConsoleArguments::s_ConsumeArg(_Inout_ std::vector<std::wstring>& args, _In
s_ConsumeArg(args, i);
hr = S_OK;
}
else if (arg == PASSTHROUGH_ARG)
{
_passthroughMode = true;
s_ConsumeArg(args, i);
hr = S_OK;
}
else if (arg.substr(0, FILEPATH_LEADER_PREFIX.length()) == FILEPATH_LEADER_PREFIX)
{
// beginning of command line -- includes file path
Expand Down Expand Up @@ -602,11 +595,6 @@ bool ConsoleArguments::ShouldRunAsComServer() const
return _runAsComServer;
}

bool ConsoleArguments::IsPassthroughMode() const noexcept
{
return _passthroughMode;
}

HANDLE ConsoleArguments::GetServerHandle() const
{
return ULongToHandle(_serverHandle);
Expand Down
19 changes: 5 additions & 14 deletions src/host/ConsoleArguments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class ConsoleArguments
bool IsHeadless() const;
bool ShouldCreateServerHandle() const;
bool ShouldRunAsComServer() const;
bool IsPassthroughMode() const noexcept;

HANDLE GetServerHandle() const;
HANDLE GetVtInHandle() const;
Expand Down Expand Up @@ -76,7 +75,6 @@ class ConsoleArguments
static const std::wstring_view FEATURE_ARG;
static const std::wstring_view FEATURE_PTY_ARG;
static const std::wstring_view COM_SERVER_ARG;
static const std::wstring_view PASSTHROUGH_ARG;

private:
#ifdef UNIT_TESTING
Expand All @@ -95,8 +93,7 @@ class ConsoleArguments
const DWORD serverHandle,
const DWORD signalHandle,
const bool inheritCursor,
const bool runAsComServer,
const bool passthroughMode) :
const bool runAsComServer) :
_commandline(commandline),
_clientCommandline(clientCommandline),
_vtInHandle(vtInHandle),
Expand All @@ -112,8 +109,7 @@ class ConsoleArguments
_signalHandle(signalHandle),
_inheritCursor(inheritCursor),
_resizeQuirk(false),
_runAsComServer{ runAsComServer },
_passthroughMode{ passthroughMode }
_runAsComServer{ runAsComServer }
{
}
#endif
Expand All @@ -135,7 +131,6 @@ class ConsoleArguments
short _width;
short _height;

bool _passthroughMode{ false };
bool _runAsComServer;
bool _createServerHandle;
DWORD _serverHandle;
Expand Down Expand Up @@ -191,7 +186,6 @@ namespace WEX
L"Signal Handle: '0x%x'\r\n",
L"Inherit Cursor: '%ws'\r\n",
L"Run As Com Server: '%ws'\r\n",
L"Passthrough Mode: '%ws'\r\n",
ci.GetClientCommandline().c_str(),
s_ToBoolString(ci.HasVtHandles()),
ci.GetVtInHandle(),
Expand All @@ -206,8 +200,7 @@ namespace WEX
s_ToBoolString(ci.HasSignalHandle()),
ci.GetSignalHandle(),
s_ToBoolString(ci.GetInheritCursor()),
s_ToBoolString(ci.ShouldRunAsComServer()),
s_ToBoolString(ci.IsPassthroughMode()));
s_ToBoolString(ci.ShouldRunAsComServer()));
}

private:
Expand Down Expand Up @@ -237,8 +230,7 @@ namespace WEX
expected.HasSignalHandle() == actual.HasSignalHandle() &&
expected.GetSignalHandle() == actual.GetSignalHandle() &&
expected.GetInheritCursor() == actual.GetInheritCursor() &&
expected.ShouldRunAsComServer() == actual.ShouldRunAsComServer() &&
expected.IsPassthroughMode() == actual.IsPassthroughMode();
expected.ShouldRunAsComServer() == actual.ShouldRunAsComServer();
}

static bool AreSame(const ConsoleArguments& expected, const ConsoleArguments& actual)
Expand All @@ -264,8 +256,7 @@ namespace WEX
object.GetServerHandle() == 0 &&
(object.GetSignalHandle() == 0 || object.GetSignalHandle() == INVALID_HANDLE_VALUE) &&
!object.GetInheritCursor() &&
!object.ShouldRunAsComServer() &&
!object.IsPassthroughMode();
!object.ShouldRunAsComServer();
}
};
}
Expand Down
Loading
Loading