[PR #9954] [MERGED] Add desktop param to globalSummon; set _quake = toCurrent #27820

Open
opened 2026-01-31 09:24:29 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9954
Author: @zadjii-msft
Created: 4/26/2021
Status: Merged
Merged: 4/28/2021
Merged by: @DHowett

Base: mainHead: dev/migrie/f/quake-toCurrent-desktop


📝 Commits (1)

  • fe51444 Squash merge on top of original Global Summon branch

📊 Changes

20 files changed (+958 additions, -24 deletions)

View changed files

📝 NOTICE.md (+30 -0)
📝 src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj (+6 -0)
📝 src/cascadia/Remoting/Monarch.cpp (+5 -2)
📝 src/cascadia/Remoting/Monarch.idl (+3 -1)
📝 src/cascadia/Remoting/Peasant.cpp (+6 -2)
📝 src/cascadia/Remoting/Peasant.h (+2 -2)
📝 src/cascadia/Remoting/Peasant.idl (+9 -2)
src/cascadia/Remoting/SummonWindowBehavior.cpp (+5 -0)
src/cascadia/Remoting/SummonWindowBehavior.h (+35 -0)
📝 src/cascadia/Remoting/SummonWindowSelectionArgs.h (+3 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+7 -2)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+8 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h (+9 -0)
📝 src/cascadia/UnitTests_Remoting/RemotingTests.cpp (+581 -2)
📝 src/cascadia/WindowsTerminal/AppHost.cpp (+56 -8)
📝 src/cascadia/WindowsTerminal/AppHost.h (+5 -1)
📝 src/cascadia/WindowsTerminal/IslandWindow.cpp (+2 -2)
src/cascadia/WindowsTerminal/VirtualDesktopUtils.cpp (+173 -0)
src/cascadia/WindowsTerminal/VirtualDesktopUtils.h (+11 -0)
📝 src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj (+2 -0)

📄 Description

This adds support for the desktop param to the globalSummon action. It accepts 3 values:

  • toCurrent (default): The window moves to the current desktop when it's summoned
  • any: We don't care what desktop the window is on. We'll go to the desktop the window is on when we summon it.
  • onCurrent: We'll only try to summon the MRU window on this desktop when summoning a window.
    • When combined with name, if there's a window matching name, we'll move it to this desktop.
    • If there's not a window on this desktop, and name is omitted, then we'll make a new window.

quakeMode was also updated to use toCurrent behavior by default.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

S/O to https://github.com/microsoft/PowerToys, who graciously let us use VirtualDesktopUtils for figuring out what desktop is the current desktop. Yea, that's all we needed that entire file for. No, there isn't an API for this (surprised-pikachu.png)

Validation Steps Performed

Played with this for a while, and it's amazing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9954 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/26/2021 **Status:** ✅ Merged **Merged:** 4/28/2021 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/f/quake-toCurrent-desktop` --- ### 📝 Commits (1) - [`fe51444`](https://github.com/microsoft/terminal/commit/fe51444e195133b47c4d2d59c848c99fafa18c93) Squash merge on top of original Global Summon branch ### 📊 Changes **20 files changed** (+958 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `NOTICE.md` (+30 -0) 📝 `src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj` (+6 -0) 📝 `src/cascadia/Remoting/Monarch.cpp` (+5 -2) 📝 `src/cascadia/Remoting/Monarch.idl` (+3 -1) 📝 `src/cascadia/Remoting/Peasant.cpp` (+6 -2) 📝 `src/cascadia/Remoting/Peasant.h` (+2 -2) 📝 `src/cascadia/Remoting/Peasant.idl` (+9 -2) ➕ `src/cascadia/Remoting/SummonWindowBehavior.cpp` (+5 -0) ➕ `src/cascadia/Remoting/SummonWindowBehavior.h` (+35 -0) 📝 `src/cascadia/Remoting/SummonWindowSelectionArgs.h` (+3 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+7 -2) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h` (+9 -0) 📝 `src/cascadia/UnitTests_Remoting/RemotingTests.cpp` (+581 -2) 📝 `src/cascadia/WindowsTerminal/AppHost.cpp` (+56 -8) 📝 `src/cascadia/WindowsTerminal/AppHost.h` (+5 -1) 📝 `src/cascadia/WindowsTerminal/IslandWindow.cpp` (+2 -2) ➕ `src/cascadia/WindowsTerminal/VirtualDesktopUtils.cpp` (+173 -0) ➕ `src/cascadia/WindowsTerminal/VirtualDesktopUtils.h` (+11 -0) 📝 `src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj` (+2 -0) </details> ### 📄 Description This adds support for the `desktop` param to the `globalSummon` action. It accepts 3 values: * `toCurrent` (default): The window moves to the current desktop when it's summoned * `any`: We don't care what desktop the window is on. We'll go to the desktop the window is on when we summon it. * `onCurrent`: We'll only try to summon the MRU window on this desktop when summoning a window. * When combined with `name`, if there's a window matching `name`, we'll move it to this desktop. * If there's not a window on this desktop, and `name` is omitted, then we'll make a new window. `quakeMode` was also updated to use `toCurrent` behavior by default. ## References * Original thread: #653 * Spec: #9274 * megathread: #8888 ## PR Checklist * [x] Checks some boxes in #8888 * [x] closes https://github.com/microsoft/terminal/projects/5#card-59030845 * [x] I work here * [x] Tests added * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments S/O to https://github.com/microsoft/PowerToys, who graciously let us use `VirtualDesktopUtils` for figuring out what desktop is the current desktop. Yea, that's all we needed that entire file for. No, there isn't an API for this (_surprised-pikachu.png_) ## Validation Steps Performed Played with this for a while, and it's amazing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:29 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27820