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

Add support for the windowingBehavior setting #9118

Merged
91 commits merged into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
3bef7bb
Get all the projects created and hooked up to the sln
zadjii-msft Dec 16, 2020
1f52d35
Yank all the M/P files, this builds?!
zadjii-msft Dec 16, 2020
5a9cdc8
Shockingly, this works, it works elevated, and it works unpackaged
zadjii-msft Dec 16, 2020
36539cf
This won't work, but I'm committing this becaus I finally got it to c…
zadjii-msft Dec 16, 2020
27ace16
whoop, we pass the commandline from the peasant, to the monarch, and …
zadjii-msft Dec 16, 2020
9a41647
HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!…
zadjii-msft Dec 17, 2020
5cabcfb
add a note to future me
zadjii-msft Dec 17, 2020
03bfc6e
This works as a unittest, but not a local test. That's batty
zadjii-msft Dec 17, 2020
590b9ff
this macro makes me feel dirty
zadjii-msft Dec 17, 2020
0579b24
LocalTests_Remoting -> UnitTests_Remoting
zadjii-msft Dec 17, 2020
a3faed6
finish renaming this test
zadjii-msft Dec 17, 2020
9c6eac4
Clean up a lot for review
zadjii-msft Dec 17, 2020
0103331
cleanup Peasant for review
zadjii-msft Dec 17, 2020
b4fe1bf
Final cleanup for review
zadjii-msft Dec 17, 2020
d08e65c
_final_ final cleanup for review
zadjii-msft Dec 17, 2020
e101efd
pr nits
zadjii-msft Dec 18, 2020
e1402d8
This seems to work to create a thread listening for the monarch, and …
zadjii-msft Dec 18, 2020
f978a9c
it's hard to believe he's gone / were it so easy
zadjii-msft Dec 18, 2020
5939636
Oh yea actually remove the thing
zadjii-msft Dec 18, 2020
c088895
last commit before the holidays
zadjii-msft Dec 18, 2020
fa2df47
Merge remote-tracking branch 'origin/main' into dev/migrie/f/remoting…
zadjii-msft Jan 5, 2021
0f5c24f
Enable audit mode
zadjii-msft Jan 5, 2021
921d915
nits
zadjii-msft Jan 5, 2021
00184e7
Merge branch 'dev/migrie/f/remoting.dll' into dev/migrie/f/the-first-…
zadjii-msft Jan 5, 2021
658db6b
Ask the TerminalApp to parse the commandline, and tell us what the wi…
zadjii-msft Jan 6, 2021
977db46
Holy bajesus, this works like a charm
zadjii-msft Jan 6, 2021
bcbef34
Add a note about commiting suicide
zadjii-msft Jan 6, 2021
813dbc6
notes, comments, cleanup
zadjii-msft Jan 6, 2021
0f0df5e
activate windows
zadjii-msft Jan 6, 2021
9fc2f0e
add some tracelogging
zadjii-msft Jan 6, 2021
6537686
The peasant will now correctly inform the monarch when it re-connects
zadjii-msft Jan 7, 2021
a75da0a
mostly just notes
zadjii-msft Jan 7, 2021
c02f25a
peasants now switch to the cwd that was requested
zadjii-msft Jan 7, 2021
3e39ab9
more comments
zadjii-msft Jan 7, 2021
52b2cb6
Allow the user to provide ids on the commandline
zadjii-msft Jan 7, 2021
bc492f1
Code cleanup
zadjii-msft Jan 7, 2021
88ffc6f
Merge remote-tracking branch 'origin/main' into dev/migrie/f/remoting…
zadjii-msft Jan 7, 2021
be74b2e
putting var in headers is bad, mkay?
zadjii-msft Jan 7, 2021
2a7bc94
branding
zadjii-msft Jan 7, 2021
81c09d9
Merge branch 'dev/migrie/f/remoting.dll' into dev/migrie/f/the-first-…
zadjii-msft Jan 8, 2021
c34e4ce
Merge remote-tracking branch 'origin/main' into dev/migrie/f/the-firs…
zadjii-msft Jan 8, 2021
5b8ace2
A bunch of tests for Monarch::ProposeCommandline
zadjii-msft Jan 8, 2021
689c385
sure yea that's a doc comment
zadjii-msft Jan 8, 2021
59deca1
Merge branch 'main' into dev/migrie/f/the-first-galactic-empire
zadjii-msft Jan 26, 2021
f02969b
More tests, more redundancy
zadjii-msft Jan 26, 2021
b2db317
man I can't spel
zadjii-msft Jan 26, 2021
d2a3438
Add try/catch's throughout Monarch.cpp
zadjii-msft Jan 27, 2021
a65f341
trycatch the window manager. A lot more going on there.
zadjii-msft Jan 27, 2021
faf4544
add some abstracts
zadjii-msft Jan 29, 2021
19765b1
Apply suggestions from code review
zadjii-msft Jan 29, 2021
4e007ae
a ton of PR feedback
zadjii-msft Jan 29, 2021
c493607
bunch of PR feedback
zadjii-msft Feb 2, 2021
8de368a
Merge remote-tracking branch 'origin/main' into dev/migrie/f/the-firs…
zadjii-msft Feb 2, 2021
e6bd315
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
a62d53f
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
147b187
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
a102f44
bad merge
zadjii-msft Feb 2, 2021
7097274
Thats right, did it in one commit suckas
zadjii-msft Feb 2, 2021
67b525b
barf I hate the stl
zadjii-msft Feb 2, 2021
e4357c5
I'm not happy with this code, but i'm VERY HAPPY with how well it works
zadjii-msft Feb 2, 2021
e0d5a84
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 2, 2021
32ebf4e
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 3, 2021
9ab951c
Start working on tests
zadjii-msft Feb 3, 2021
6dc0feb
What? No yea I always run the tests
zadjii-msft Feb 2, 2021
9e94b36
I guess the tests weren't too bad
zadjii-msft Feb 3, 2021
39c4e44
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 9, 2021
031139b
!!! This needs to go to the parent branch !!!
zadjii-msft Feb 9, 2021
26437b0
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 10, 2021
683c146
Fix a weird bug in windowingBehavior:useExisting
zadjii-msft Feb 10, 2021
8072efa
Add a test for this weird case from the last commit
zadjii-msft Feb 10, 2021
5edfe28
revert this file
zadjii-msft Feb 10, 2021
ccf8d63
Some spellcheck fixes
zadjii-msft Feb 10, 2021
5abb55a
it'd be a shame if I wrote unittests for a data structure that I need…
zadjii-msft Feb 10, 2021
8537a2d
this is a disaster
zadjii-msft Feb 10, 2021
5315779
well, this bug is fixed, let's clean it up now
zadjii-msft Feb 11, 2021
f9445d7
fix the tests
zadjii-msft Feb 11, 2021
5df4c16
Remove a bunch of dead code, add comments
zadjii-msft Feb 11, 2021
8aefb6c
Somehow, this breaks the world? I'm just going to revert all of it
zadjii-msft Feb 11, 2021
8d05c5d
Revert "Somehow, this breaks the world? I'm just going to revert all …
zadjii-msft Feb 11, 2021
36bb19b
ho boy am I daft
zadjii-msft Feb 11, 2021
f96dad4
Ready for the prime time
zadjii-msft Feb 11, 2021
4860066
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 12, 2021
00a4093
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 17, 2021
e15c345
Rename the setting
zadjii-msft Feb 17, 2021
570375d
Add windowingBehavior to the SUI
zadjii-msft Feb 17, 2021
8c524e4
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 18, 2021
257d92b
most of the PR feedback
zadjii-msft Feb 18, 2021
1bf6754
Move the header to make Dustin happy
zadjii-msft Feb 18, 2021
cb311d8
some PR nits
zadjii-msft Feb 18, 2021
5eff079
Merge remote-tracking branch 'origin/main' into dev/migrie/f/2227-win…
zadjii-msft Feb 18, 2021
fa96b5d
words r hard
zadjii-msft Feb 19, 2021
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
1 change: 1 addition & 0 deletions .github/actions/spelling/dictionary/apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ IPeasant
IStorage
ITab
ITaskbar
IVirtual
LCID
llabs
llu
Expand Down
10 changes: 10 additions & 0 deletions doc/cascadia/profiles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,16 @@
"type": "string"
}
]
},
"windowingBehavior": {
"default": "useNew",
"description": "Controls how new terminal instances attach to existing windows. \"useNew\" will always create a new window. \"useExisting\" will create new tabs in the most recently used window on this virtual desktop, and \"useAnyExisting\" will create tabs in the most recent window on any desktop.",
"enum": [
"useNew",
"useExisting",
"useAnyExisting"
],
"type": "string"
}
},
"required": [
Expand Down
316 changes: 271 additions & 45 deletions src/cascadia/Remoting/Monarch.cpp

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions src/cascadia/Remoting/Monarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "Monarch.g.h"
#include "Peasant.h"
#include "../cascadia/inc/cppwinrt_utils.h"
#include "WindowActivatedArgs.h"

// We sure different GUIDs here depending on whether we're running a Release,
// Preview, or Dev build. This ensures that different installs don't
Expand All @@ -30,12 +31,6 @@ constexpr GUID Monarch_clsid
}
};

enum class WindowingBehavior : uint64_t
{
UseNew = 0,
UseExisting = 1,
};

namespace RemotingUnitTests
{
class RemotingTests;
Expand Down Expand Up @@ -63,17 +58,20 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation

uint64_t _nextPeasantID{ 1 };
uint64_t _thisPeasantID{ 0 };
uint64_t _mostRecentPeasant{ 0 };
winrt::Windows::Foundation::DateTime _lastActivatedTime{};

WindowingBehavior _windowingBehavior{ WindowingBehavior::UseNew };
winrt::com_ptr<IVirtualDesktopManager> _desktopManager{ nullptr };

std::unordered_map<uint64_t, winrt::Microsoft::Terminal::Remoting::IPeasant> _peasants;

std::vector<Remoting::WindowActivatedArgs> _mruPeasants;

winrt::Microsoft::Terminal::Remoting::IPeasant _getPeasant(uint64_t peasantID);
uint64_t _getMostRecentPeasantID();
uint64_t _getMostRecentPeasantID(bool limitToCurrentDesktop);

void _peasantWindowActivated(const winrt::Windows::Foundation::IInspectable& sender,
const winrt::Microsoft::Terminal::Remoting::WindowActivatedArgs& args);
void _doHandleActivatePeasant(const winrt::com_ptr<winrt::Microsoft::Terminal::Remoting::implementation::WindowActivatedArgs>& args);
void _clearOldMruEntries(const uint64_t peasantID);

friend class RemotingUnitTests::RemotingTests;
};
Expand Down
2 changes: 2 additions & 0 deletions src/cascadia/Remoting/Peasant.idl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ namespace Microsoft.Terminal.Remoting
runtimeclass WindowActivatedArgs
{
WindowActivatedArgs(UInt64 peasantID, Guid desktopID, Windows.Foundation.DateTime activatedTime);
WindowActivatedArgs(UInt64 peasantID, UInt64 hwnd, Guid desktopID, Windows.Foundation.DateTime activatedTime);
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
UInt64 PeasantID { get; };
UInt64 Hwnd { get; };
Guid DesktopID { get; };
Windows.Foundation.DateTime ActivatedTime { get; };
};
Expand Down
25 changes: 24 additions & 1 deletion src/cascadia/Remoting/WindowActivatedArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,40 @@ Class Name:

namespace winrt::Microsoft::Terminal::Remoting::implementation
{
struct CompareWindowActivatedArgs
{
bool operator()(const Remoting::WindowActivatedArgs& lhs, const Remoting::WindowActivatedArgs& rhs) const
{
return lhs.ActivatedTime() > rhs.ActivatedTime();
}
};
struct WindowActivatedArgs : public WindowActivatedArgsT<WindowActivatedArgs>
{
GETSET_PROPERTY(uint64_t, PeasantID, 0);
GETSET_PROPERTY(winrt::guid, DesktopID, {});
GETSET_PROPERTY(winrt::Windows::Foundation::DateTime, ActivatedTime, {});
GETSET_PROPERTY(uint64_t, Hwnd, 0);

public:
WindowActivatedArgs(uint64_t peasantID, winrt::guid desktopID, winrt::Windows::Foundation::DateTime timestamp) :
WindowActivatedArgs(uint64_t peasantID,
uint64_t hwnd,
winrt::guid desktopID,
winrt::Windows::Foundation::DateTime timestamp) :
_PeasantID{ peasantID },
_Hwnd{ hwnd },
_DesktopID{ desktopID },
_ActivatedTime{ timestamp } {};

WindowActivatedArgs(uint64_t peasantID,
winrt::guid desktopID,
winrt::Windows::Foundation::DateTime timestamp) :
WindowActivatedArgs(peasantID, 0, desktopID, timestamp){};

WindowActivatedArgs(const Remoting::WindowActivatedArgs& other) :
_PeasantID{ other.PeasantID() },
_Hwnd{ other.Hwnd() },
_DesktopID{ other.DesktopID() },
_ActivatedTime{ other.ActivatedTime() } {};
};
}

Expand Down
8 changes: 6 additions & 2 deletions src/cascadia/Remoting/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@

#pragma once

// Block minwindef.h min/max macros to prevent <algorithm> conflict
#define NOMINMAX

#define WIN32_LEAN_AND_MEAN
#define NOMCX
#define NOHELP
#define NOCOMM

#include <unknwn.h>
#include <ShObjIdl.h>

// Manually include til after we include Windows.Foundation to give it winrt superpowers
#define BLOCK_TIL
#include <LibraryIncludes.h>
Expand All @@ -25,8 +31,6 @@

#include <wil/cppwinrt.h>

#include <unknwn.h>

#include <hstring.h>

#include <winrt/Windows.ApplicationModel.h>
Expand Down
16 changes: 11 additions & 5 deletions src/cascadia/TerminalApp/AppCommandlineArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ void AppCommandlineArgs::_buildParser()
maximized->excludes(fullscreen);
focus->excludes(fullscreen);

_app.add_option("-w,--window",
_windowTarget,
RS_A(L"CmdWindowTargetArgDesc"));
_app.add_option<std::optional<int>, int>("-w,--window",
_windowTarget,
RS_A(L"CmdWindowTargetArgDesc"));

// Subcommands
_buildNewTabParser();
Expand Down Expand Up @@ -854,10 +854,16 @@ void AppCommandlineArgs::FullResetState()
_exitMessage = "";
_shouldExitEarly = false;

_windowTarget = -1;
_windowTarget = std::nullopt;
}

int AppCommandlineArgs::GetTargetWindow() const noexcept
std::optional<int> AppCommandlineArgs::GetTargetWindow() const noexcept
{
// If the user provides _any_ negative number, then treat it as -1, for "use a new window".
if (_windowTarget.has_value() && *_windowTarget < 0)
{
return { -1 };
}

return _windowTarget;
}
4 changes: 2 additions & 2 deletions src/cascadia/TerminalApp/AppCommandlineArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TerminalApp::AppCommandlineArgs final
void DisableHelpInExitMessage();
void FullResetState();

int GetTargetWindow() const noexcept;
std::optional<int> GetTargetWindow() const noexcept;

private:
static const std::wregex _commandDelimiterRegex;
Expand Down Expand Up @@ -106,7 +106,7 @@ class TerminalApp::AppCommandlineArgs final
std::string _exitMessage;
bool _shouldExitEarly{ false };

int _windowTarget{ -1 };
std::optional<int> _windowTarget{ std::nullopt };
// Are you adding more args or attributes here? If they are not reset in _resetStateToDefault, make sure to reset them in FullResetState

winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs _getNewTerminalArgs(NewTerminalSubcommand& subcommand);
Expand Down
47 changes: 32 additions & 15 deletions src/cascadia/TerminalApp/AppLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "pch.h"
#include "AppLogic.h"
#include "../inc/WindowingBehavior.h"
#include "AppLogic.g.cpp"
#include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>

Expand Down Expand Up @@ -1197,27 +1198,43 @@ namespace winrt::TerminalApp::implementation
// - args: an array of strings to process as a commandline. These args can contain spaces
// Return Value:
// - 0: We should handle the args "in the current window".
// - -1: We should handle the args in a new window
// - WindowingBehaviorUseNew: We should handle the args in a new window
// - WindowingBehaviorUseExisting: We should handle the args "in
// the current window ON THIS DESKTOP"
// - WindowingBehaviorUseAnyExisting: We should handle the args "in the current
// window ON ANY DESKTOP"
// - anything else: We should handle the commandline in the window with the given ID.
int32_t AppLogic::FindTargetWindow(array_view<const winrt::hstring> args)
{
::TerminalApp::AppCommandlineArgs appArgs;
const auto result = appArgs.ParseArgs(args);
if (result == 0)
{
return appArgs.GetTargetWindow();

// TODO:projects/5
//
// In the future, we'll want to use the windowingBehavior setting to
// determine what happens when a window ID wasn't manually provided.
//
// Maybe that'd be a special return value out of here, to tell the
// monarch to do something special:
//
// -1 -> create a new window
// -2 -> find the mru, this desktop
// -3 -> MRU, any desktop (is this not just 0?)
const auto parsedTarget = appArgs.GetTargetWindow();
if (parsedTarget.has_value())
{
// parsedTarget might be -1, if the user explicitly requested -1
// (or any other negative number) on the commandline. So the set
// of possible values here is {-1, 0, ℤ+}
return *parsedTarget;
}
else
{
// If the user did not provide any value on the commandline,
// then lookup our windowing behavior to determine what to do
// now.
const auto windowingBehavior = _settings.GlobalSettings().WindowingBehavior();
switch (windowingBehavior)
{
case WindowingMode::UseExisting:
return WindowingBehaviorUseExisting;
case WindowingMode::UseAnyExisting:
return WindowingBehaviorUseAnyExisting;
case WindowingMode::UseNew:
default:
return WindowingBehaviorUseNew;
}
}
}

// Any unsuccessful parse will be a new window. That new window will try
Expand All @@ -1231,7 +1248,7 @@ namespace winrt::TerminalApp::implementation
// create a new window. Then, in that new window, we'll try to set the
// StartupActions, which will again fail, returning the correct error
// message.
return -1;
return WindowingBehaviorUseNew;
}

// Method Description:
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/Launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
InitializeComponent();

INITIALIZE_BINDABLE_ENUM_SETTING(LaunchMode, LaunchMode, LaunchMode, L"Globals_LaunchMode", L"Content");
INITIALIZE_BINDABLE_ENUM_SETTING(WindowingBehavior, WindowingMode, WindowingMode, L"Globals_WindowingBehavior", L"Content");
}

void Launch::OnNavigatedTo(const NavigationEventArgs& e)
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/Launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
GETSET_PROPERTY(Editor::LaunchPageNavigationState, State, nullptr);

GETSET_BINDABLE_ENUM_SETTING(LaunchMode, Model::LaunchMode, State().Settings().GlobalSettings, LaunchMode);
GETSET_BINDABLE_ENUM_SETTING(WindowingBehavior, Model::WindowingMode, State().Settings().GlobalSettings, WindowingBehavior);
};
}

Expand Down
8 changes: 6 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Launch.idl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import "EnumEntry.idl";
import "EnumEntry.idl";

namespace Microsoft.Terminal.Settings.Editor
{
Expand All @@ -18,6 +18,10 @@ namespace Microsoft.Terminal.Settings.Editor
IInspectable CurrentDefaultProfile;

IInspectable CurrentLaunchMode;
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> LaunchModeList { get; };
IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> LaunchModeList { get; };


IInspectable CurrentWindowingBehavior;
IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> WindowingBehaviorList { get; };
}
}
7 changes: 7 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ the MIT License. See LICENSE in the project root for license information. -->
ItemsSource="{x:Bind LaunchModeList}"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
</local:SettingContainer>

<!--Launch Mode-->
<local:SettingContainer x:Uid="Globals_WindowingBehavior">
<muxc:RadioButtons SelectedItem="{x:Bind CurrentWindowingBehavior, Mode=TwoWay}"
ItemsSource="{x:Bind WindowingBehaviorList}"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"/>
</local:SettingContainer>
</StackPanel>

<!--Launch Size-->
Expand Down
15 changes: 15 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<data name="Globals_LaunchModeMaximized.Content" xml:space="preserve">
<value>Maximized</value>
</data>
<data name="Globals_WindowingBehavior.Header" xml:space="preserve">
<value>New instance behavior</value>
</data>
<data name="Globals_WindowingBehavior.HelpText" xml:space="preserve">
<value>Controls how new terminal instances attach to existing windows.</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<value>Controls how new terminal instances attach to existing windows.</value>
<value>Controls how new terminal instances launched from wt.exe attach to existing windows.</value>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a little redundant though, right? Like, all the windows are ones spawned from wt.exe. Do we really need to specify that?

</data>
<data name="Globals_WindowingBehaviorUseNew.Content" xml:space="preserve">
<value>Create a new window</value>
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
</data>
<data name="Globals_WindowingBehaviorUseAnyExisting.Content" xml:space="preserve">
<value>Attach to the most recently used window</value>
</data>
<data name="Globals_WindowingBehaviorUseExisting.Content" xml:space="preserve">
<value>Attach to the most recently used window on this desktop</value>
</data>
<data name="Globals_RenderingDisclaimer.Text" xml:space="preserve">
<value>These settings may be useful for troubleshooting an issue, however they will impact your performance.</value>
</data>
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsModel/EnumMappings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
DEFINE_ENUM_MAP(Model::LaunchMode, LaunchMode);
DEFINE_ENUM_MAP(Model::TabSwitcherMode, TabSwitcherMode);
DEFINE_ENUM_MAP(Microsoft::Terminal::TerminalControl::CopyFormat, CopyFormat);
DEFINE_ENUM_MAP(Model::WindowingMode, WindowingMode);

// Profile Settings
DEFINE_ENUM_MAP(Model::CloseOnExitMode, CloseOnExitMode);
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsModel/EnumMappings.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, LaunchMode> LaunchMode();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, TabSwitcherMode> TabSwitcherMode();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, winrt::Microsoft::Terminal::TerminalControl::CopyFormat> CopyFormat();
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, WindowingMode> WindowingMode();

// Profile Settings
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, CloseOnExitMode> CloseOnExitMode();
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsModel/EnumMappings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Microsoft.Terminal.Settings.Model
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.LaunchMode> LaunchMode { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.TabSwitcherMode> TabSwitcherMode { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.TerminalControl.CopyFormat> CopyFormat { get; };
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.WindowingMode> WindowingMode { get; };

// Profile Settings
static Windows.Foundation.Collections.IMap<String, Microsoft.Terminal.Settings.Model.CloseOnExitMode> CloseOnExitMode { get; };
Expand Down
Loading