[PR #9054] fix tab title propagation issues #27408

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

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

State: closed
Merged: Yes


  • Fixes empty app title when showTerminalTitleInTitlebar is false
  • Fixes Tab title propagation to Window title when
    showTerminalTitleInTitlebar is false
  • Fixes Tab title propagation to Window - title doesn't update when
    Window is unfocused
  1. There were a missing
    _settings.GlobalSettings().ShowTitleInTitlebar() check. Because of
    this Title update event was being fired even when
    showTerminalTitleInTitlebar is false. This results in empty tab
    title to propagate to Window title. Also then after switching tabs
    back and forth, tab title propagates to window title. These shouldn't
    propagate when showTerminalTitleInTitlebar is false. I added the
    showTerminalTitleInTitlebar check in relevant logic to fix the
    behavior.

  2. Code was checking tab.FocusState() != FocusState::Unfocused , but
    when the whole terminal window is not in focus, the active tab is
    also in Unfocused state. This was preventing tab title to propagate
    to window title when application is unfocused. I added the logic of
    checking matching selected tabs' index. This fixes the issue.

Validation Steps Performed

I did the reproduce steps descripted in the issue to reproduce the bugs.
After applying the fixes, the bugs don't appear anymore while doing the
reproduce steps.

Closes #8704

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9054 **State:** closed **Merged:** Yes --- - Fixes empty app title when `showTerminalTitleInTitlebar` is false - Fixes Tab title propagation to Window title when `showTerminalTitleInTitlebar` is false - Fixes Tab title propagation to Window - title doesn't update when Window is unfocused 1. There were a missing `_settings.GlobalSettings().ShowTitleInTitlebar()` check. Because of this Title update event was being fired even when `showTerminalTitleInTitlebar` is false. This results in empty tab title to propagate to Window title. Also then after switching tabs back and forth, tab title propagates to window title. These shouldn't propagate when `showTerminalTitleInTitlebar` is false. I added the `showTerminalTitleInTitlebar` check in relevant logic to fix the behavior. 2. Code was checking `tab.FocusState() != FocusState::Unfocused` , but when the whole terminal window is not in focus, the active tab is also in Unfocused state. This was preventing tab title to propagate to window title when application is unfocused. I added the logic of checking matching selected tabs' index. This fixes the issue. ## Validation Steps Performed I did the reproduce steps descripted in the issue to reproduce the bugs. After applying the fixes, the bugs don't appear anymore while doing the reproduce steps. Closes #8704
claunia added the pull-request label 2026-01-31 09:21:47 +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#27408