[PR #12506] [CLOSED] Add user option to start minimized when acting as default host for windows #29081

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12506
Author: @ocalvo
Created: 2/16/2022
Status: Closed

Base: mainHead: user/ocalvo/NullTerminal


📝 Commits (10+)

📊 Changes

20 files changed (+128 additions, -22 deletions)

View changed files

📝 src/cascadia/Remoting/Peasant.idl (+1 -0)
📝 src/cascadia/Remoting/SummonWindowBehavior.h (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+25 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+3 -1)
📝 src/cascadia/TerminalSettingsEditor/Launch.cpp (+2 -0)
📝 src/cascadia/TerminalSettingsEditor/Launch.h (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Launch.idl (+3 -0)
📝 src/cascadia/TerminalSettingsEditor/Launch.xaml (+11 -0)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+16 -2)
📝 src/cascadia/TerminalSettingsModel/EnumMappings.cpp (+1 -0)
📝 src/cascadia/TerminalSettingsModel/EnumMappings.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/EnumMappings.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+11 -1)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+2 -1)
📝 src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h (+9 -0)
📝 src/cascadia/WindowsTerminal/AppHost.cpp (+14 -1)
📝 src/cascadia/WindowsTerminal/IslandWindow.cpp (+23 -16)
📝 src/cascadia/WindowsTerminal/IslandWindow.h (+1 -0)

📄 Description

Summary of the Pull Request

By default, when a new console process requests a new host, WinTerminal creates a new Window and activates the window.
This change adds a new option so that the new Window starts minimized and does not steal foreground activation.
This is very helpful in environments where a user interface test is driven via a script, and modification of the foreground window could alter the result of the test.

!-- Other than the issue solved, is this relevant to any other issues/existing PRs? -->

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

  1. Set WinTerminal as default console host.
  2. Do not activate the new feature, ensure WinTerminal behaves as expected (Terminal Window is shown normally as per LaunchMode)
  3. Change the new setting to start Minimized.
  4. Start phyton.exe, Check the Terminal Window is created but minimized. Check foreground is not changed.

🔄 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/12506 **Author:** [@ocalvo](https://github.com/ocalvo) **Created:** 2/16/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `user/ocalvo/NullTerminal` --- ### 📝 Commits (10+) - [`64529dc`](https://github.com/microsoft/terminal/commit/64529dc4b719fd78a76613f2e479a02eb1151129) It works for the first instance - [`124d0ab`](https://github.com/microsoft/terminal/commit/124d0ab5e86e9e836db91b722caf918c89cb046e) Make it work for a second instance - [`31898b6`](https://github.com/microsoft/terminal/commit/31898b66e1c39b6d07f37313437ed878b522a25e) Adds new setting - [`3251e3c`](https://github.com/microsoft/terminal/commit/3251e3c84afaac19c8754c93519dcf945910ff49) It builds - [`5ae7b62`](https://github.com/microsoft/terminal/commit/5ae7b626388e562e1b9a05654c3a8cefe66b07c5) Add UI for new setting - [`70f19f5`](https://github.com/microsoft/terminal/commit/70f19f57931569f6a2bbf9e70075b185255454fd) It works, missing one piece - [`2faa65e`](https://github.com/microsoft/terminal/commit/2faa65e96864027680b5c2660fb4dd108254a9dc) Another case - [`4dbbf2f`](https://github.com/microsoft/terminal/commit/4dbbf2f34c0edb515a86eb27a26e3e3d156c0c50) Fix formatting - [`56a7861`](https://github.com/microsoft/terminal/commit/56a78610a2e960dc784eddf4df41ea368b4bea6c) Use isHandoffListener - [`e05b9e7`](https://github.com/microsoft/terminal/commit/e05b9e7c11629c497e2295c4ed1809028091606c) Format update ### 📊 Changes **20 files changed** (+128 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/Remoting/Peasant.idl` (+1 -0) 📝 `src/cascadia/Remoting/SummonWindowBehavior.h` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+25 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+3 -1) 📝 `src/cascadia/TerminalSettingsEditor/Launch.cpp` (+2 -0) 📝 `src/cascadia/TerminalSettingsEditor/Launch.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Launch.idl` (+3 -0) 📝 `src/cascadia/TerminalSettingsEditor/Launch.xaml` (+11 -0) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+16 -2) 📝 `src/cascadia/TerminalSettingsModel/EnumMappings.cpp` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/EnumMappings.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/EnumMappings.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+11 -1) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+2 -1) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h` (+9 -0) 📝 `src/cascadia/WindowsTerminal/AppHost.cpp` (+14 -1) 📝 `src/cascadia/WindowsTerminal/IslandWindow.cpp` (+23 -16) 📝 `src/cascadia/WindowsTerminal/IslandWindow.h` (+1 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request By default, when a new console process requests a new host, WinTerminal creates a new Window and activates the window. This change adds a new option so that the new Window starts minimized and does not steal foreground activation. This is very helpful in environments where a user interface test is driven via a script, and modification of the foreground window could alter the result of the test. !-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Set WinTerminal as default console host. 2. Do not activate the new feature, ensure WinTerminal behaves as expected (Terminal Window is shown normally as per LaunchMode) 3. Change the new setting to start Minimized. 4. Start phyton.exe, Check the Terminal Window is created but minimized. Check foreground is not changed. --- <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:32:39 +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#29081