-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
base: main
Are you sure you want to change the base?
Fix Application Title Being Stuck After Swapping "showTerminalTitleInTitlebar" From False to True #19139
Conversation
a590448
to
2fd692d
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this 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 }; |
There was a problem hiding this comment.
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 🙂
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
2fd692d
to
d0133bd
Compare
d0133bd
to
3da3a52
Compare
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
PR Checklist