Skip to content

Fix Application Title Being Stuck After Swapping "showTerminalTitleInTitlebar" From False to True #19139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Techypanda
Copy link

@Techypanda Techypanda commented Jul 17, 2025

Summary of the Pull Request

This PR makes is so that if you are in showTabsInTitlebar = false and showTerminalTitleInTitlebar = true, then you swap showTerminalTitleInTitlebar = false. The Window title will reset back to "Terminal", this leads to a better UX of seeing Terminal instead of whatever page you were last on (in issue its Settings but really it could be anything).

References and Relevant Issues

#12871

Detailed Description of the Pull Request / Additional comments

Introduced a check on apphost when settings update, if it needs to reset title it will

Validation Steps Performed

  • Tested with set to false
  • Tested with set to true
  • Tested with multiple windows

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jul 17, 2025
@Techypanda Techypanda force-pushed the fix-use-active-terminal-title branch from a590448 to 2fd692d Compare July 17, 2025 04:42
@Techypanda Techypanda marked this pull request as ready for review July 17, 2025 04:43
@DHowett
Copy link
Member

DHowett commented Jul 19, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open questions. Thanks for taking this on!

@@ -58,6 +58,8 @@ namespace winrt

namespace winrt::TerminalApp::implementation
{
bool TerminalPage::_hasShownTerminalTitleInTitlebar{ false };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah - having a global for this may make it work poorly when there are multiple windows open. All windows are served by the same instance of WindowsTerminal.exe 🙂

Copy link
Author

@Techypanda Techypanda Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, didn't consider this; Let me restructure, maybe i can put this in terminal window somehow

Confirmed that if you open 2+ instances of windows terminal and try the above approach, only one window will consume the variable and fix its title. Need to find a way to broadcast to all windows to fix, will dig into this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have come up with a more concise/cleaner approach but its potentially slower, however, it does work with 4+ windows, could you provide guidance if this approach is against best practice (I had to introduce a getTitle to the basewindow.h) @DHowett

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 19, 2025
@Techypanda Techypanda marked this pull request as draft July 21, 2025 01:50
@Techypanda Techypanda force-pushed the fix-use-active-terminal-title branch from 2fd692d to d0133bd Compare July 21, 2025 04:16
@Techypanda Techypanda force-pushed the fix-use-active-terminal-title branch from d0133bd to 3da3a52 Compare July 21, 2025 04:18
@Techypanda Techypanda requested a review from DHowett July 21, 2025 04:19
@Techypanda Techypanda marked this pull request as ready for review July 21, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application title stuck on "Settings" after Use active terminal title as application title is disabled
2 participants