[PR #14944] [MERGED] Add support for running the Terminal without _any_ windows #30313

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14944
Author: @zadjii-msft
Created: 3/2/2023
Status: Merged
Merged: 4/6/2023
Merged by: @zadjii-msft

Base: mainHead: dev/migrie/oop/3/feanor-and-the-unchaining-of-melkor


📝 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

7 files changed (+25 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+10 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+1 -0)
📝 src/cascadia/WindowsTerminal/WindowEmperor.cpp (+9 -1)
📝 src/cascadia/WindowsTerminal/WindowEmperor.h (+2 -0)

📄 Description

This adds a setting (compatibility.allowHeadless) to let the Terminal keep running even when all windows are closed. This lets hotkeys keep working, because the Emperor thread is still running, just, without any windows.

I'm really tempted to invoke the magic "closes" word on #9996, but honestly, we should also add some sort of support for wt --headless or wt --hidden or whatever, before we close that. There's also #13630 which seems imminently doable.

Tested manually. I'd post a gif of "close all terminal windows, then invoke the quakeMode binding and *presto*, but that would be an unnecessarily big gif.

Related to #9996 but not enough to close it if you ask me


🔄 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/14944 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/2/2023 **Status:** ✅ Merged **Merged:** 4/6/2023 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `main` ← **Head:** `dev/migrie/oop/3/feanor-and-the-unchaining-of-melkor` --- ### 📝 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 **7 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+10 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+1 -0) 📝 `src/cascadia/WindowsTerminal/WindowEmperor.cpp` (+9 -1) 📝 `src/cascadia/WindowsTerminal/WindowEmperor.h` (+2 -0) </details> ### 📄 Description This adds a setting (`compatibility.allowHeadless`) to let the Terminal keep running even when all windows are closed. This lets hotkeys keep working, because the Emperor thread is still running, just, without any windows. I'm really tempted to invoke the magic "closes" word on #9996, but honestly, we should also add some sort of support for `wt --headless` or `wt --hidden` or whatever, before we close that. There's also #13630 which seems imminently doable. Tested manually. I'd post a gif of "close all terminal windows, then invoke the quakeMode binding and \*presto\*, but that would be an unnecessarily big gif. Related to #9996 but not enough to close it if you ask me --- <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:40:01 +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#30313