[PR #14866] [MERGED] Add support for moving panes and tabs between windows #30286

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14866
Author: @zadjii-msft
Created: 2/17/2023
Status: ✅ Merged
Merged: 3/30/2023
Merged by: @zadjii-msft

Base: main ← Head: dev/migrie/oop/3/quenta-silmarillion


📝 Commits (10+)

  • 581acd4 I definitely want all of this. But I started down a path for refactoring AppLogic that I hate so I'm gonna start over
  • a5255ba I don't think I want any of these
  • e6220b7 Revert "I don't think I want any of these"
  • 936c01f Start splitting AppLogic into AppLogic and Window logic
  • 439b21f this is dangerously close to compiling
  • 99bc280 It doesn't crash on launch. That's something. There's no startupActions though, so it immediately exits
  • 2195515 it launches
  • 5116ca1 I think the todo's that are left, we can move on without them for now.
  • ef7e2ed Merge branch 'dev/migrie/oop/3/foreword' into dev/migrie/oop/3/ainulindale
  • af14c2b [TO PARENT] Move the page ctor call, so that it can happen after the XAML island is started.

📊 Changes

52 files changed (+944 additions, -169 deletions)

View changed files

📝 src/cascadia/Remoting/Monarch.cpp (+54 -0)
📝 src/cascadia/Remoting/Monarch.h (+2 -0)
📝 src/cascadia/Remoting/Monarch.idl (+2 -0)
📝 src/cascadia/Remoting/Peasant.cpp (+17 -0)
📝 src/cascadia/Remoting/Peasant.h (+18 -0)
📝 src/cascadia/Remoting/Peasant.idl (+12 -0)
📝 src/cascadia/Remoting/WindowManager.cpp (+9 -0)
📝 src/cascadia/Remoting/WindowManager.h (+4 -0)
📝 src/cascadia/Remoting/WindowManager.idl (+2 -0)
📝 src/cascadia/TerminalApp/ActionPaletteItem.cpp (+0 -22)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+3 -12)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.cpp (+1 -1)
📝 src/cascadia/TerminalApp/ContentManager.cpp (+11 -2)
📝 src/cascadia/TerminalApp/ContentManager.h (+7 -2)
📝 src/cascadia/TerminalApp/Pane.cpp (+57 -11)
📝 src/cascadia/TerminalApp/Pane.h (+2 -2)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+4 -0)
📝 src/cascadia/TerminalApp/SettingsTab.cpp (+6 -3)
📝 src/cascadia/TerminalApp/SettingsTab.h (+1 -1)
📝 src/cascadia/TerminalApp/TabBase.h (+1 -1)

...and 32 more files

📄 Description

Lo! Harken to me, for I shall divulge the heart of the tab tear-out saga. Verily, this PR shall bestow upon thee the power to move tabs and panes between windows by means of pre-defined actions. Though be warned, it does not yet grant thee the power to drag and drop them as thou mayest desire. Yet, the same plumbing that underpins this work shall remain steadfast. Behold, the majority of this undertaking concerns the elevation of the RequestMoveContent event from the TerminalPage to the very summit of the Monarch. From thence, a great AttachContent method shall descend back to the lowest depths. Furthermore, there are minor revisions to TermControl that shall enable thee to better detach the content and attach it to a new one.

This is the most important part of the tab tear-out saga. This PR enables the user to move tabs and panes between windows using pre-defined actions. It does not enable the user to drag/drop them yet, but the same fundamental plumbing will still apply. Most of the PR is plumbing the RequestMoveContent event up from the TerminalPage up to the Monarch, and then plumbing an AttachContent method back down. There are also small changes to TermControl to better support detaching the content and attaching to a new one.

For testing, I recommend:

        { "keys": "f1", "command": { "action": "moveTab", "window": "1" } },
        { "keys": "f2", "command": { "action": "moveTab", "window": "2" } },

        { "keys": "f3", "command": { "action": "movePane", "window": "1" } },
        { "keys": "f4", "command": { "action": "movePane", "window": "2" } },

        { "keys": "shift+f3", "command": { "action": "movePane", "window": "1", "index": 3 } },
        { "keys": "shift+f4", "command": { "action": "movePane", "window": "2", "index": 3 } },

🔄 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/14866 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/17/2023 **Status:** ✅ Merged **Merged:** 3/30/2023 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `main` ← **Head:** `dev/migrie/oop/3/quenta-silmarillion` --- ### 📝 Commits (10+) - [`581acd4`](https://github.com/microsoft/terminal/commit/581acd40d9a5f7bcefdbaf29516bf418207be727) I definitely want all of this. But I started down a path for refactoring AppLogic that I hate so I'm gonna start over - [`a5255ba`](https://github.com/microsoft/terminal/commit/a5255ba8ed4cce537d3ac32b875a5a1516d4f4cb) I don't think I want any of these - [`e6220b7`](https://github.com/microsoft/terminal/commit/e6220b7fe7fbe293a2a1f99357d0973f2dde4f95) Revert "I don't think I want any of these" - [`936c01f`](https://github.com/microsoft/terminal/commit/936c01f948ac58d1a520dc7fbced8bb6d25c36b6) Start splitting AppLogic into AppLogic and Window logic - [`439b21f`](https://github.com/microsoft/terminal/commit/439b21f879be488b0ebc8e3901da6b3dd568bb99) this is dangerously close to compiling - [`99bc280`](https://github.com/microsoft/terminal/commit/99bc2802076ec7fa833bb77ef4a2c3997d93e52b) It doesn't crash on launch. That's something. There's no startupActions though, so it immediately exits - [`2195515`](https://github.com/microsoft/terminal/commit/219551593724eb1d822bc957c8497295d1b4fe5d) it launches - [`5116ca1`](https://github.com/microsoft/terminal/commit/5116ca1e77ed7ed75ab51ab58e803aa211ef850f) I think the todo's that are left, we can move on without them for now. - [`ef7e2ed`](https://github.com/microsoft/terminal/commit/ef7e2edfa5ee8f9cfda8f980cd540d89c1a552ef) Merge branch 'dev/migrie/oop/3/foreword' into dev/migrie/oop/3/ainulindale - [`af14c2b`](https://github.com/microsoft/terminal/commit/af14c2b75100ade347eda75582499d9caa460c2c) [TO PARENT] Move the page ctor call, so that it can happen after the XAML island is started. ### 📊 Changes **52 files changed** (+944 additions, -169 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/Remoting/Monarch.cpp` (+54 -0) 📝 `src/cascadia/Remoting/Monarch.h` (+2 -0) 📝 `src/cascadia/Remoting/Monarch.idl` (+2 -0) 📝 `src/cascadia/Remoting/Peasant.cpp` (+17 -0) 📝 `src/cascadia/Remoting/Peasant.h` (+18 -0) 📝 `src/cascadia/Remoting/Peasant.idl` (+12 -0) 📝 `src/cascadia/Remoting/WindowManager.cpp` (+9 -0) 📝 `src/cascadia/Remoting/WindowManager.h` (+4 -0) 📝 `src/cascadia/Remoting/WindowManager.idl` (+2 -0) 📝 `src/cascadia/TerminalApp/ActionPaletteItem.cpp` (+0 -22) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+3 -12) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/ContentManager.cpp` (+11 -2) 📝 `src/cascadia/TerminalApp/ContentManager.h` (+7 -2) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+57 -11) 📝 `src/cascadia/TerminalApp/Pane.h` (+2 -2) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+4 -0) 📝 `src/cascadia/TerminalApp/SettingsTab.cpp` (+6 -3) 📝 `src/cascadia/TerminalApp/SettingsTab.h` (+1 -1) 📝 `src/cascadia/TerminalApp/TabBase.h` (+1 -1) _...and 32 more files_ </details> ### 📄 Description _Lo! Harken to me, for I shall divulge the heart of the tab tear-out saga. Verily, this PR shall bestow upon thee the power to move tabs and panes between windows by means of pre-defined actions. Though be warned, it does not yet grant thee the power to drag and drop them as thou mayest desire. Yet, the same plumbing that underpins this work shall remain steadfast. Behold, the majority of this undertaking concerns the elevation of the RequestMoveContent event from the TerminalPage to the very summit of the Monarch. From thence, a great AttachContent method shall descend back to the lowest depths. Furthermore, there are minor revisions to TermControl that shall enable thee to better detach the content and attach it to a new one._ This is the most important part of the tab tear-out saga. This PR enables the user to move tabs and panes between windows using pre-defined actions. It does _not_ enable the user to drag/drop them yet, but the same fundamental plumbing will still apply. Most of the PR is plumbing the `RequestMoveContent` event up from the `TerminalPage` up to the `Monarch`, and then plumbing an `AttachContent` method back down. There are also small changes to `TermControl` to better support detaching the content and attaching to a new one. For testing, I recommend: ```json { "keys": "f1", "command": { "action": "moveTab", "window": "1" } }, { "keys": "f2", "command": { "action": "moveTab", "window": "2" } }, { "keys": "f3", "command": { "action": "movePane", "window": "1" } }, { "keys": "f4", "command": { "action": "movePane", "window": "2" } }, { "keys": "shift+f3", "command": { "action": "movePane", "window": "1", "index": 3 } }, { "keys": "shift+f4", "command": { "action": "movePane", "window": "2", "index": 3 } }, ``` * Related to #1256 * Related to #5000 --- <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:39:50 +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#30286