[PR #9208] [MERGED] Add support for the newWindow action #27471

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9208
Author: @zadjii-msft
Created: 2/18/2021
Status: Merged
Merged: 2/19/2021
Merged by: @undefined

Base: mainHead: dev/migrie/f/1051-newWindow


📝 Commits (10+)

  • 3bef7bb Get all the projects created and hooked up to the sln
  • 1f52d35 Yank all the M/P files, this builds?!
  • 5a9cdc8 Shockingly, this works, it works elevated, and it works unpackaged
  • 36539cf This won't work, but I'm committing this becaus I finally got it to compile a String[]
  • 27ace16 whoop, we pass the commandline from the peasant, to the monarch, and then back!
  • 9a41647 HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 5cabcfb add a note to future me
  • 03bfc6e This works as a unittest, but not a local test. That's batty
  • 590b9ff this macro makes me feel dirty
  • 0579b24 LocalTests_Remoting -> UnitTests_Remoting

📊 Changes

17 files changed (+466 additions, -107 deletions)

View changed files

📝 .github/actions/spelling/dictionary/apis.txt (+2 -0)
📝 doc/cascadia/profiles.schema.json (+14 -0)
📝 src/cascadia/LocalTests_SettingsModel/CommandTests.cpp (+143 -0)
📝 src/cascadia/ShellExtension/OpenTerminalHere.cpp (+2 -94)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+87 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.cpp (+5 -6)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.h (+1 -1)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.idl (+1 -1)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+4 -3)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+65 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+37 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+7 -0)
📝 src/cascadia/TerminalSettingsModel/KeyMapping.idl (+2 -2)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+1 -0)
src/cascadia/WinRTUtils/inc/WtExeUtils.h (+93 -0)

📄 Description

Finally implements the newWindow action. It does so by
ShellExecuteing wt.exe with commandline args corresponding to the
ones that would create the same NewTerminalArgs. This works with #8898
and #9118 to allow new windows (even with windowingBehavior: useExisting)

This is taken from my auto-elevate branch, hence the references to
elevation

References #5000
References projects/5
References #8898
References #9118
Closes #1051


🔄 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/9208 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/18/2021 **Status:** ✅ Merged **Merged:** 2/19/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/1051-newWindow` --- ### 📝 Commits (10+) - [`3bef7bb`](https://github.com/microsoft/terminal/commit/3bef7bbb389f7b048983bac8dda32af0e662a9fb) Get all the projects created and hooked up to the sln - [`1f52d35`](https://github.com/microsoft/terminal/commit/1f52d3583390e300b8253d605b5f79adac5e921b) Yank all the M/P files, this builds?! - [`5a9cdc8`](https://github.com/microsoft/terminal/commit/5a9cdc8b0bfda790a70368d8381559628eba554f) Shockingly, this works, it works elevated, and it works unpackaged - [`36539cf`](https://github.com/microsoft/terminal/commit/36539cfa47d1b5f3a3b0bf44f7bdcb057aa08e95) This won't work, but I'm committing this becaus I finally got it to compile a String[] - [`27ace16`](https://github.com/microsoft/terminal/commit/27ace166529367171fc81cef12aa4812e6ff8e13) whoop, we pass the commandline from the peasant, to the monarch, and then back! - [`9a41647`](https://github.com/microsoft/terminal/commit/9a41647ffe00d973f11478fb937221239d6ac81a) HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - [`5cabcfb`](https://github.com/microsoft/terminal/commit/5cabcfb45229f686d424c6d5a2fdfca7dd446639) add a note to future me - [`03bfc6e`](https://github.com/microsoft/terminal/commit/03bfc6e8a93c901ef00b34310c4e1c313019e720) This works as a unittest, but not a local test. That's batty - [`590b9ff`](https://github.com/microsoft/terminal/commit/590b9ff0c73487720a110213c4b19a2f4a00be8e) this macro makes me feel dirty - [`0579b24`](https://github.com/microsoft/terminal/commit/0579b2417bcdd74814ea05d7eb64723542584764) LocalTests_Remoting -> UnitTests_Remoting ### 📊 Changes **17 files changed** (+466 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/dictionary/apis.txt` (+2 -0) 📝 `doc/cascadia/profiles.schema.json` (+14 -0) 📝 `src/cascadia/LocalTests_SettingsModel/CommandTests.cpp` (+143 -0) 📝 `src/cascadia/ShellExtension/OpenTerminalHere.cpp` (+2 -94) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+87 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.cpp` (+5 -6) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.h` (+1 -1) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.idl` (+1 -1) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+4 -3) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+65 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+37 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+7 -0) 📝 `src/cascadia/TerminalSettingsModel/KeyMapping.idl` (+2 -2) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+1 -0) ➕ `src/cascadia/WinRTUtils/inc/WtExeUtils.h` (+93 -0) </details> ### 📄 Description Finally implements the `newWindow` action. It does so by `ShellExecute`ing `wt.exe` with commandline args corresponding to the ones that would create the same `NewTerminalArgs`. This works with #8898 and #9118 to allow new windows (even with `windowingBehavior: useExisting`) This is taken from my auto-elevate branch, hence the references to elevation References #5000 References projects/5 References #8898 References #9118 Closes #1051 --- <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:22:10 +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#27471