[PR #15713] Ensure we are in the foreground when closed with multiple tabs open #30712

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

Original Pull Request: https://github.com/microsoft/terminal/pull/15713

State: closed
Merged: No


Summary of the Pull Request

  • Adds an event to the TerminalPage and TerminalWindow that can be raised when the terminal is closed with multiple tabs opened. This event can be handled in the AppHost by summoning the window.

References and Relevant Issues

#12605

Detailed Description of the Pull Request / Additional comments

I initially implemented this as a WINRT_CALLBACK but it kind of stuck out in the host layer so I decided to switch it to a TypedEvent. This will also allow for information passing if so desired in the future.

Validation Steps Performed

Validated that the window is brought to the foreground when multiple tabs are open so that the Confirm dialog is seen. Window is not summoned if only a single tab is open.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15713 **State:** closed **Merged:** No --- ## Summary of the Pull Request - Adds an event to the `TerminalPage` and `TerminalWindow` that can be raised when the terminal is closed with multiple tabs opened. This event can be handled in the `AppHost` by summoning the window. ## References and Relevant Issues #12605 ## Detailed Description of the Pull Request / Additional comments I initially implemented this as a `WINRT_CALLBACK` but it kind of stuck out in the host layer so I decided to switch it to a `TypedEvent`. This will also allow for information passing if so desired in the future. ## Validation Steps Performed Validated that the window is brought to the foreground when multiple tabs are open so that the Confirm dialog is seen. Window is not summoned if only a single tab is open. ## PR Checklist - [ ] Closes #12605 - [ ] 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 (if necessary)
claunia added the pull-request label 2026-01-31 09:42:30 +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#30712