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 "monitor": "any"|"toCurrent"|"toMouse" setting to globalSummon #10092

Merged
118 commits merged into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 116 commits
Commits
Show all changes
118 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
1c2f8e5
This will always summon the monarch window
zadjii-msft Jan 28, 2021
71f6b58
RegisterHotKey will be more robust
zadjii-msft Jan 28, 2021
18d1a20
Add support for the `win` key in keybindings
zadjii-msft Jan 28, 2021
a41bee6
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
6e7ea61
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
18099d2
Summon the most recent window
zadjii-msft Jan 28, 2021
3e5d927
Cleanup, now that this isn't needed
zadjii-msft Jan 28, 2021
91b52d4
!!! THIS NEEDS TO BE MOVED TO THE PARENT BRANCH !!!
zadjii-msft Jan 28, 2021
848682a
Oh hey SetForegroundWindow might be the thing
zadjii-msft Jan 28, 2021
1dcb4cb
man this is crisp
zadjii-msft Jan 28, 2021
fee6473
Still trying to figure this out exactly. For linking: #653
zadjii-msft Jan 28, 2021
342d3f2
This works if the window _isn't_ minimized
zadjii-msft Jan 29, 2021
5052d31
deal with minimized windows too
zadjii-msft Jan 29, 2021
eff18d1
more cleanup
zadjii-msft Jan 29, 2021
5c039ea
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 12, 2021
10779ca
We caan now summon based on window name or just use the MRU one. Note…
zadjii-msft Apr 12, 2021
25b31ff
Allow the user to set multiple globalSummon keys, and quakeMode for s…
zadjii-msft Apr 12, 2021
7c2a514
if there is no window with the name, then make a new window with the …
zadjii-msft Apr 12, 2021
ac8fef0
THATS RIGHT, IT HOT-RELOADS
zadjii-msft Apr 12, 2021
1fdb6b1
Tests and doc comments
zadjii-msft Apr 14, 2021
784ec73
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 14, 2021
b20222f
More comments
zadjii-msft Apr 14, 2021
9d76c62
Some dead code cleanup
zadjii-msft Apr 14, 2021
2a2f5cb
pre emptive spellbot
zadjii-msft Apr 14, 2021
71577fc
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 16, 2021
f892752
Add some tracelogging to find a heisenbug that might not have ever be…
zadjii-msft Apr 16, 2021
4166afa
Okay that was bad pre-emptive spelling
zadjii-msft Apr 16, 2021
717db81
Again, nobody's got disk space to build x86. This is a guess
zadjii-msft Apr 19, 2021
1b2e7a7
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 19, 2021
305e627
oh man, this will magic summon the window to the current desktop. I'm…
zadjii-msft Apr 19, 2021
9f9eacb
!! THIS NEEDS TO GO TO THE PARENT BRANCH !!
zadjii-msft Apr 19, 2021
f71c948
Add support for summoning to the current virtual desktop
zadjii-msft Apr 19, 2021
51617cf
cache these results
zadjii-msft Apr 20, 2021
2eec961
All of carlos's feedback
zadjii-msft Apr 21, 2021
15a8a9c
!! THIS NEEDS TO GO TO THE PARENT BRANCH !!
zadjii-msft Apr 19, 2021
8370789
replace todo with comment
zadjii-msft Apr 21, 2021
4eb1d3a
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 23, 2021
c215a97
Merge branch 'dev/migrie/f/653-QUAKE-MODE' into dev/migrie/f/quake-to…
zadjii-msft Apr 23, 2021
26d5194
this test is _fantastic_
zadjii-msft Apr 23, 2021
91372ea
more tests, because I like being thorough
zadjii-msft Apr 23, 2021
045a8db
fix a build break
zadjii-msft Apr 23, 2021
c95a429
Give Clint the credit they deserce
zadjii-msft Apr 26, 2021
b5e0f2d
When the window is summoned and is already active, minimize it.
zadjii-msft Apr 26, 2021
6c4238b
Toggle the visibility with an optional argument
zadjii-msft Apr 26, 2021
0abd963
update the comment
zadjii-msft Apr 26, 2021
643b860
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 27, 2021
84c1bd9
Merge remote-tracking branch 'origin/main' into dev/migrie/f/quake-to…
zadjii-msft Apr 28, 2021
24bfbe6
BODGY fix for newer builds
zadjii-msft Apr 28, 2021
4c2e6d2
Merge remote-tracking branch 'origin/main' into dev/migrie/f/quake-to…
zadjii-msft Apr 28, 2021
aec2561
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 28, 2021
22036c2
Merge branch 'dev/migrie/f/653-QUAKE-MODE' into dev/migrie/f/quake-to…
zadjii-msft Apr 28, 2021
173720f
Add property to control dropdown speed of global summon
zadjii-msft Apr 28, 2021
b607a55
The OS has first dibs on animation settings
zadjii-msft Apr 28, 2021
63b3658
spel
zadjii-msft Apr 28, 2021
5940f05
Merge remote-tracking branch 'origin/main' into dev/migrie/f/653-QUAK…
zadjii-msft Apr 28, 2021
06cb41b
Address Dustin's PR comments
zadjii-msft Apr 28, 2021
783be75
Merge branch 'dev/migrie/f/653-QUAKE-MODE' into dev/migrie/f/quake-to…
zadjii-msft Apr 28, 2021
6c424f7
pr nits
zadjii-msft Apr 28, 2021
387d675
Merge branch 'dev/migrie/f/quake-toCurrent-desktop' into dev/migrie/f…
zadjii-msft Apr 28, 2021
f190576
Merge branch 'dev/migrie/f/quake-toggleVisibility' into dev/migrie/f/…
zadjii-msft Apr 28, 2021
960e1fa
Merge remote-tracking branch 'origin/main' into dev/migrie/f/quake-dr…
zadjii-msft Apr 29, 2021
caeb17f
Merge remote-tracking branch 'origin/main' into dev/migrie/f/quake-dr…
zadjii-msft May 13, 2021
f3d34b2
implement monitor:tocurrent, without a setting
zadjii-msft May 13, 2021
acc08f1
plumb settings for this through
zadjii-msft May 13, 2021
6cb3af6
Add support for toMouse as well, because that actaully feels _more_ c…
zadjii-msft May 13, 2021
5cc4561
doc comments, and update spec (since I can't update docs yet.)
zadjii-msft May 13, 2021
7a0952c
some comment fixes
zadjii-msft May 14, 2021
85ce928
good spellbot
zadjii-msft May 14, 2021
c34a8d6
Merge remote-tracking branch 'origin/main' into dev/migrie/quake/moni…
zadjii-msft May 17, 2021
6781046
yes they can be const actually
zadjii-msft May 17, 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 @@ -36,6 +36,7 @@ HIGHCONTRASTON
HIGHCONTRASTW
hotkeys
href
hrgn
IActivation
IApp
IAppearance
Expand Down
46 changes: 37 additions & 9 deletions doc/specs/#653 - Quake Mode/#653 - Quake Mode.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
author: Mike Griese @zadjii-msft
created on: 2021-02-23
last updated: 2021-04-21
last updated: 2021-05-13
issue id: #653
---

Expand Down Expand Up @@ -132,7 +132,7 @@ the window. To try and satisfy all these scenarios, I'm proposing the following
two arguments to the `globalSummon` action:
```json
"monitor": "any"|"toCurrent"|"onCurrent"|int,
"monitor": "any"|"toCurrent"|"toMouse"|"onCurrent"|int,
"desktop": "any"|"toCurrent"|"onCurrent"
```
Expand All @@ -141,8 +141,10 @@ The way these settings can be combined is in a table below. As an overview:
* `monitor`: This controls the monitor that the window will be summoned from/to
- `"any"`: Summon the MRU window, regardless of which monitor it's currently
on.
- `"toCurrent"`/omitted: (_default_): Summon the MRU window **TO** the current
monitor.
- `"toCurrent"`/omitted: (_default_): Summon the MRU window **TO** the monitor
with the current **foreground** window.
- `"toMouse"`: Summon the MRU window **TO** the monitor where the **mouse**
cursor is.
- `"onCurrent"`: Summon the MRU window **ALREADY ON** the current monitor.
- `int`: Summon the MRU window for the given monitor (as identified by the
"Identify" displays feature in the OS settings)
Expand Down Expand Up @@ -193,16 +195,33 @@ Else:
</tr>
<!-- ----------------------------------------------------------------------- -->
<tr>
<td><code>"toCurrent"</code><br> Summon the MRU window TO the current monitor</td>
<td>Go to the desktop the window is on, move to this monitor</td>
<td>Move the window to this desktop, move to this monitor</td>
<td><code>"toCurrent"</code><br> Summon the MRU window TO the monitor with the foreground window</td>
<td>Go to the desktop the window is on, move to the monitor with the foreground window</td>
<td>Move the window to this desktop, move to the monitor with the foreground window</td>
<td>

If there isn't one on this desktop:
* create a new one (on the monitor with the foreground window)

Else:
* activate the one on this desktop, move to the monitor with the foreground window
</td>
</tr>
<!-- ----------------------------------------------------------------------- -->
<tr>
<td>
<code>"toMouse"</code>
<sup><a href="#footnote-2">[2]</a></sup> <br>
Summon the MRU window TO the monitor with the mouse</td>
<td>Go to the desktop the window is on, move to the monitor with the mouse</td>
<td>Move the window to this desktop, move to the monitor with the mouse</td>
<td>

If there isn't one on this desktop:
* create a new one (on this monitor)
* create a new one (on the monitor with the mouse)

Else:
* activate the one on this desktop, move to this window
* activate the one on this desktop, move to the monitor with the mouse
</td>
</tr>
<!-- ----------------------------------------------------------------------- -->
Expand Down Expand Up @@ -673,6 +692,8 @@ aren't already included in this spec.
```
That would allow the user some further customizations on the quake mode
behaviors.
- This was later converted to the idea in [#9992] - Add per-window-name global
settings
* Another proposed idea was a simplification of some of the summoning modes. `{
"monitor": "any", "desktop": "any" }` is a little long, and maybe not the most
apparent naming. Perhaps we could add another property like `summonMode` that
Expand All @@ -698,9 +719,16 @@ windows. Once [#766] lands, this will give us a chance to persist the state of
_all_ open windows. This will allow us to re-open with all the user's windows,
not just the one that happened to be closed last.

<a name="footnote-2"><a>[2]: **Addenda, May 2021**: In the course of
implementation, it became apparent that there's an important UX difference
between summoning _to the monitor with the cursor_ vs _to the monitor with the
foreground window_. `"monitor": "toMouse"` was added as an option, to allow the
user to differentiate between the two behaviors.

[#653]: https://github.com/microsoft/terminal/issues/653
[#766]: https://github.com/microsoft/terminal/issues/766
[#5727]: https://github.com/microsoft/terminal/issues/5727
[#9992]: https://github.com/microsoft/terminal/issues/9992

[Process Model 2.0 Spec]: https://github.com/microsoft/terminal/blob/main/doc/specs/%235000%20-%20Process%20Model%202.0/%235000%20-%20Process%20Model%202.0.md
[Quake 3 sample]: https://youtu.be/ZmR6HQbuHPA?t=27
Expand Down
13 changes: 11 additions & 2 deletions src/cascadia/Remoting/Peasant.idl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,21 @@ namespace Microsoft.Terminal.Remoting
Windows.Foundation.DateTime ActivatedTime { get; };
};


enum MonitorBehavior
{
InPlace,
ToCurrent,
ToMouse,
};


[default_interface] runtimeclass SummonWindowBehavior {
SummonWindowBehavior();
Boolean MoveToCurrentDesktop;
Boolean ToggleVisibility;
// Other options:
// * CurrentMonitor
UInt32 DropdownDuration;
MonitorBehavior ToMonitor;
}

interface IPeasant
Expand Down
4 changes: 4 additions & 0 deletions src/cascadia/Remoting/SummonWindowBehavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
SummonWindowBehavior() = default;
WINRT_PROPERTY(bool, MoveToCurrentDesktop, true);
WINRT_PROPERTY(bool, ToggleVisibility, true);
WINRT_PROPERTY(uint32_t, DropdownDuration, 0);
WINRT_PROPERTY(Remoting::MonitorBehavior, ToMonitor, Remoting::MonitorBehavior::ToCurrent);

public:
SummonWindowBehavior(const Remoting::SummonWindowBehavior& other) :
_MoveToCurrentDesktop{ other.MoveToCurrentDesktop() },
_ToMonitor{ other.ToMonitor() },
_DropdownDuration{ other.DropdownDuration() },
_ToggleVisibility{ other.ToggleVisibility() } {};
};
}
Expand Down
15 changes: 14 additions & 1 deletion src/cascadia/TerminalSettingsModel/ActionArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1158,11 +1158,15 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
GlobalSummonArgs() = default;
WINRT_PROPERTY(winrt::hstring, Name, L"");
WINRT_PROPERTY(Model::DesktopBehavior, Desktop, Model::DesktopBehavior::ToCurrent);
WINRT_PROPERTY(Model::MonitorBehavior, Monitor, Model::MonitorBehavior::ToMouse);
WINRT_PROPERTY(bool, ToggleVisibility, true);
WINRT_PROPERTY(uint32_t, DropdownDuration, 0);

static constexpr std::string_view NameKey{ "name" };
static constexpr std::string_view DesktopKey{ "desktop" };
static constexpr std::string_view MonitorKey{ "monitor" };
static constexpr std::string_view ToggleVisibilityKey{ "toggleVisibility" };
static constexpr std::string_view DropdownDurationKey{ "dropdownDuration" };

public:
hstring GenerateName() const;
Expand All @@ -1173,6 +1177,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
{
return otherAsUs->_Name == _Name &&
otherAsUs->_Desktop == _Desktop &&
otherAsUs->_Monitor == _Monitor &&
otherAsUs->_DropdownDuration == _DropdownDuration &&
otherAsUs->_ToggleVisibility == _ToggleVisibility;
}
return false;
Expand All @@ -1183,6 +1189,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
auto args = winrt::make_self<GlobalSummonArgs>();
JsonUtils::GetValueForKey(json, NameKey, args->_Name);
JsonUtils::GetValueForKey(json, DesktopKey, args->_Desktop);
JsonUtils::GetValueForKey(json, MonitorKey, args->_Monitor);
JsonUtils::GetValueForKey(json, DropdownDurationKey, args->_DropdownDuration);
JsonUtils::GetValueForKey(json, ToggleVisibilityKey, args->_ToggleVisibility);
return { *args, {} };
}
Expand All @@ -1191,6 +1199,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
auto copy{ winrt::make_self<GlobalSummonArgs>() };
copy->_Name = _Name;
copy->_Desktop = _Desktop;
copy->_Monitor = _Monitor;
copy->_DropdownDuration = _DropdownDuration;
copy->_ToggleVisibility = _ToggleVisibility;
return *copy;
}
Expand All @@ -1200,12 +1210,15 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
{
// LOAD BEARING: Not using make_self here _will_ break you in the future!
auto args = winrt::make_self<GlobalSummonArgs>();
// We want to summon the window with the name "_quake" specifically.
args->_Name = QuakeWindowName;
// We want the window to dropdown, with a 200ms duration.
args->_DropdownDuration = 200;
return { *args, {} };
}
size_t Hash() const
{
return ::Microsoft::Terminal::Settings::Model::HashUtils::HashProperty(_Name, _Desktop, _ToggleVisibility);
return ::Microsoft::Terminal::Settings::Model::HashUtils::HashProperty(_Name, _Desktop, _Monitor, _DropdownDuration, _ToggleVisibility);
}
};

Expand Down
9 changes: 9 additions & 0 deletions src/cascadia/TerminalSettingsModel/ActionArgs.idl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ namespace Microsoft.Terminal.Settings.Model
OnCurrent,
};

enum MonitorBehavior
{
Any,
ToCurrent,
ToMouse,
};

[default_interface] runtimeclass NewTerminalArgs {
NewTerminalArgs();
NewTerminalArgs(Int32 profileIndex);
Expand Down Expand Up @@ -266,6 +273,8 @@ namespace Microsoft.Terminal.Settings.Model
{
String Name { get; };
DesktopBehavior Desktop { get; };
MonitorBehavior Monitor { get; };
Boolean ToggleVisibility { get; };
UInt32 DropdownDuration { get; };
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,12 @@ JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::DesktopBehavior)
pair_type{ "onCurrent", ValueType::OnCurrent },
};
};

JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::MonitorBehavior)
{
JSON_MAPPINGS(3) = {
pair_type{ "any", ValueType::Any },
pair_type{ "toCurrent", ValueType::ToCurrent },
pair_type{ "toMouse", ValueType::ToMouse },
};
};
22 changes: 20 additions & 2 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,13 @@ bool AppHost::HasWindow()
void AppHost::_DispatchCommandline(winrt::Windows::Foundation::IInspectable /*sender*/,
Remoting::CommandlineArgs args)
{
const Remoting::SummonWindowBehavior summonArgs{};
summonArgs.MoveToCurrentDesktop(false);
summonArgs.DropdownDuration(0);
summonArgs.ToMonitor(Remoting::MonitorBehavior::InPlace);
// Summon the window whenever we dispatch a commandline to it. This will
// make it obvious when a new tab/pane is created in a window.
_window->SummonWindow(false);
_window->SummonWindow(summonArgs);
Copy link
Member

Choose a reason for hiding this comment

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

i know i asked you not to but also I don't care that much 😄

_logic.ExecuteCommandline(args.Commandline(), args.CurrentDirectory());
}

Expand Down Expand Up @@ -693,6 +697,20 @@ void AppHost::_GlobalHotkeyPressed(const long hotkeyIndex)
args.OnCurrentDesktop(summonArgs.Desktop() == Settings::Model::DesktopBehavior::OnCurrent);
args.SummonBehavior().MoveToCurrentDesktop(summonArgs.Desktop() == Settings::Model::DesktopBehavior::ToCurrent);
args.SummonBehavior().ToggleVisibility(summonArgs.ToggleVisibility());
args.SummonBehavior().DropdownDuration(summonArgs.DropdownDuration());

switch (summonArgs.Monitor())
{
case Settings::Model::MonitorBehavior::Any:
miniksa marked this conversation as resolved.
Show resolved Hide resolved
args.SummonBehavior().ToMonitor(Remoting::MonitorBehavior::InPlace);
break;
case Settings::Model::MonitorBehavior::ToCurrent:
args.SummonBehavior().ToMonitor(Remoting::MonitorBehavior::ToCurrent);
break;
case Settings::Model::MonitorBehavior::ToMouse:
args.SummonBehavior().ToMonitor(Remoting::MonitorBehavior::ToMouse);
break;
}

_windowManager.SummonWindow(args);
if (args.FoundMatch())
Expand Down Expand Up @@ -775,7 +793,7 @@ bool AppHost::_LazyLoadDesktopManager()
void AppHost::_HandleSummon(const winrt::Windows::Foundation::IInspectable& /*sender*/,
const Remoting::SummonWindowBehavior& args)
{
_window->SummonWindow(args.ToggleVisibility());
_window->SummonWindow(args);

if (args != nullptr && args.MoveToCurrentDesktop())
{
Expand Down
Loading