[PR #13560] [MERGED] [DxD] Add 'Automatic' as a mode for CloseOnExit #29630

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13560
Author: @PankajBhojwani
Created: 7/21/2022
Status: Merged
Merged: 8/1/2022
Merged by: @undefined

Base: mainHead: dev/pabhoj/dxd_close


📝 Commits (8)

📊 Changes

9 files changed (+42 additions, -10 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+4 -3)
📝 src/cascadia/TerminalApp/Pane.cpp (+18 -1)
📝 src/cascadia/TerminalApp/Pane.h (+4 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+5 -1)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+4 -0)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+1 -1)
📝 src/cascadia/TerminalSettingsModel/Profile.idl (+2 -1)
📝 src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h (+2 -1)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+2 -2)

📄 Description

Summary of the Pull Request

Adds a new mode to CloseOnExit: Automatic. In this mode, if a process handed off by defterm terminates for whatever reason, we always close (i.e. we treat the mode as Always), but for processes launched by Terminal we terminate as with the Graceful behaviour.

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • Adds a new enum value to CloseOnExit
  • Adds a new function to Pane: FinalizeConfigurationGivenDefault: this is a function that should be called when the pane is created via default terminal handoff, and can contain any special configurations we should set given that the pane was created via handoff

Validation Steps Performed


🔄 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/13560 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 7/21/2022 **Status:** ✅ Merged **Merged:** 8/1/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/pabhoj/dxd_close` --- ### 📝 Commits (8) - [`23114f8`](https://github.com/microsoft/terminal/commit/23114f89f947dd08a81bf90bd46624021122e7cd) new enum value - [`2bcd818`](https://github.com/microsoft/terminal/commit/2bcd8184ca3166c5ffad8c9d764433dd3817612d) combine nests - [`9ca624f`](https://github.com/microsoft/terminal/commit/9ca624f376a2a37f29caa234d0d60c38f25d0f04) Rename flag - [`69e6a2b`](https://github.com/microsoft/terminal/commit/69e6a2b4df9fbfe2a98f703e98d548487d36f490) automatic - [`7d906ce`](https://github.com/microsoft/terminal/commit/7d906ce3b512c135b4e6aa45bad65089daac5f9b) Merge branch 'main' of https://github.com/microsoft/terminal into dev/pabhoj/dxd_close - [`f385cbb`](https://github.com/microsoft/terminal/commit/f385cbb1ffd84befff0779529d7d1d351ebdf3ca) update schema - [`93b461d`](https://github.com/microsoft/terminal/commit/93b461d3a057a7b93879f329feb8953b624d46db) Merge branch 'main' of https://github.com/microsoft/terminal into dev/pabhoj/dxd_close - [`126a48f`](https://github.com/microsoft/terminal/commit/126a48fcc37ec8ba2d3a8bdb5f4417a158cf5bc7) update given new bool name, check automatic in non-defterm session too ### 📊 Changes **9 files changed** (+42 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+4 -3) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+18 -1) 📝 `src/cascadia/TerminalApp/Pane.h` (+4 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+5 -1) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/Profile.idl` (+2 -1) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h` (+2 -1) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+2 -2) </details> ### 📄 Description ## Summary of the Pull Request Adds a new mode to `CloseOnExit`: `Automatic`. In this mode, if a process handed off by defterm terminates for whatever reason, we always close (i.e. we treat the mode as `Always`), but for processes launched by Terminal we terminate as with the `Graceful` behaviour. ## PR Checklist * [x] Closes #13325 * [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. * [x] 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 - Adds a new enum value to `CloseOnExit` - Adds a new function to `Pane`: `FinalizeConfigurationGivenDefault`: this is a function that should be called when the pane is created via default terminal handoff, and can contain any special configurations we should set given that the pane was created via handoff ## Validation Steps Performed --- <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:36:00 +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#29630