microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.25k stars 8.16k forks source link

Duplicate Titlebar when System Theme Changes #17457

Open KubaP opened 2 weeks ago

KubaP commented 2 weeks ago

Windows Terminal version

1.20.11381.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

  1. Open a new Windows Terminal window
  2. Close the window
  3. Change the Windows application theme (in either direction)
  4. Open a new Windows Terminal window again
  5. See the duplicated title bar 7lb27k8HVO

Expected Behavior

No response

Actual Behavior

How to trigger this

When the Windows application theme changes (light<->dark), and a quake mode WT instance is running in the background, upon opening a new instance of Windows Terminal, two titlebars are present.

This happens if and only if a WT window (other than the quake window) was opened and closed before the theme change, and a new WT window is opened after the theme change.

If the theme change happens whilst a WT window is open, the application colours change correctly and the titlebar isn't duplicated for the existing window. However, opening a new WT window will show the extra titlebar.

Fixing this through the titlebar

Interacting with either titlebar (hitting the minimize or maximize buttons) makes the extra titlebar disappear and retains only the WT titlebar. However, hitting either close button, and then opening a new WT window, the extra titlebar is still present.

Fixing this through the setting

Toggling the Appearance > Hide the titlebar setting from On to Off, and closing the affected window, when opening a new WT window, the two titlebars are still present but weirdly overlapping: image Then, toggling the aforementioned setting from Off back to On, and closing the affected window, when opening a new WT window the extra titlebar is not present.

When does it happen again

Once the duplicate titlebar disappears, it won't appear again until another theme change.

KubaP commented 2 weeks ago

I forgot to mention, I have never seen any other program duplicate its titlebar when changing the windows application theme (and I have a script that changes the theme daily to match day/night), hence I believe this is a bug with Windows Terminal.