Skip to content

Only set startingTitle once, clear up title fallback handling#20214

Merged
DHowett merged 1 commit into
mainfrom
dev/duhowett/title-shenaniga
May 12, 2026
Merged

Only set startingTitle once, clear up title fallback handling#20214
DHowett merged 1 commit into
mainfrom
dev/duhowett/title-shenaniga

Conversation

@DHowett
Copy link
Copy Markdown
Member

@DHowett DHowett commented May 11, 2026

This commit ensures that we only set the starting title once when we open a new terminal pane.

It also consolidates all title selection into Terminal::GetConsoleTitle, which is now used in the TitleChanged event.

TitleChanged no longer stores a separate copy of the starting title if an application attempts to clear the title; that seems like a poorer implementation of what we already had.

This supersedes work in #20204.

Closes #19340
Closes #20204

This commit ensures that we only set the starting title once when we
open a new terminal pane.

It also consolidates all title selection into Terminal::GetConsoleTitle,
which is now used in the TitleChanged event.

TitleChanged no longer stores a separate copy of the starting title if
an application attempts to _clear_ the title; that seems like a poorer
implementation of what we already had.

This supersedes work in #20204.

Closes #19340
Closes #20204

Co-authored-by: imsh <im.shaedar@gmail.com>
@DHowett
Copy link
Copy Markdown
Member Author

DHowett commented May 11, 2026

/cc @imsh - this builds on your work in #20204, and will give you credit when it is merged

@DHowett DHowett enabled auto-merge (squash) May 11, 2026 23:35
@DHowett DHowett disabled auto-merge May 11, 2026 23:35
@DHowett DHowett enabled auto-merge (squash) May 11, 2026 23:35
@DHowett DHowett merged commit b991eb0 into main May 12, 2026
18 of 20 checks passed
@DHowett DHowett deleted the dev/duhowett/title-shenaniga branch May 12, 2026 00:08
@imsh
Copy link
Copy Markdown
Contributor

imsh commented May 12, 2026

@DHowett Thanks for fixing it! Just one note, I've discovered that the --suppressApplicationTitle needs the same treatment:
If this commandline arg is specified, it gets overwritten by any refresh of the settings, so then the title can get overridden by the app too. And it feels like it is not supposed to happen.

@DHowett
Copy link
Copy Markdown
Member Author

DHowett commented May 12, 2026

@imsh you're right; however, that's part of a bigger problem where commandline-originated NewTerminalArgs get lost or ignored over time

@DHowett
Copy link
Copy Markdown
Member Author

DHowett commented May 12, 2026

(I'd like to solve it all at once)

DHowett added a commit that referenced this pull request May 12, 2026
This commit ensures that we only set the starting title once when we
open a new terminal pane.

It also consolidates all title selection into Terminal::GetConsoleTitle,
which is now used in the TitleChanged event.

TitleChanged no longer stores a separate copy of the starting title if
an application attempts to _clear_ the title; that seems like a poorer
implementation of what we already had.

This supersedes work in #20204.

Closes #19340
Closes #20204

Co-authored-by: imsh <im.shaedar@gmail.com>
(cherry picked from commit b991eb0)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgfZJdA
Service-Version: 1.24
DHowett added a commit that referenced this pull request May 12, 2026
This commit ensures that we only set the starting title once when we
open a new terminal pane.

It also consolidates all title selection into Terminal::GetConsoleTitle,
which is now used in the TitleChanged event.

TitleChanged no longer stores a separate copy of the starting title if
an application attempts to _clear_ the title; that seems like a poorer
implementation of what we already had.

This supersedes work in #20204.

Closes #19340
Closes #20204

Co-authored-by: imsh <im.shaedar@gmail.com>
(cherry picked from commit b991eb0)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgmWldU
Service-Version: 1.25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows title set with "--title" parameter gets reset to be "Default" after some time

3 participants