Dark titlebar in classic CMD is broken in Insider builds #4400

Closed
opened 2026-01-30 23:46:00 +00:00 by claunia · 7 comments
Owner

Originally created by @sylveon on GitHub (Oct 11, 2019).

Originally assigned to: @DHowett-MSFT on GitHub.

Environment

Windows build number: 10.0.18985.1 (Sorry for being outdated, I haven't been able to update to a more recent Insider build)
Windows Terminal version (if applicable): N/A

Any other software? No

Steps to reproduce

Open cmd.exe compiled from this repo or built in Windows.

Expected behavior

The titlebar is black, like in the current stable Windows.

Actual behavior

The titlebar isn't black:
image

Originally created by @sylveon on GitHub (Oct 11, 2019). Originally assigned to: @DHowett-MSFT on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18985.1 (Sorry for being outdated, I haven't been able to update to a more recent Insider build) Windows Terminal version (if applicable): N/A Any other software? No ``` # Steps to reproduce Open cmd.exe compiled from this repo or built in Windows. # Expected behavior The titlebar is black, like in the current stable Windows. # Actual behavior The titlebar isn't black: ![image](https://user-images.githubusercontent.com/6440374/66656102-57012900-ec0b-11e9-9f8c-2e241b294569.png)
Author
Owner

@sylveon commented on GitHub (Oct 11, 2019):

The window is active in this screenshot

@sylveon commented on GitHub (Oct 11, 2019): The window is active in this screenshot
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 14, 2019):

Funny enough -- you filed this shortly after I saw an uptick in log entries (in a local dev build) about this API failing. Thanks!

@DHowett-MSFT commented on GitHub (Oct 14, 2019): Funny enough -- you filed this shortly after I saw an uptick in log entries (in a local dev build) about this API failing. Thanks!
Author
Owner

@sylveon commented on GitHub (Oct 14, 2019):

The API used is technically undocumented and got moved to WCA_USEDARKMODECOLORS in the also undocumented SetWindowCompositionAttribute API, IIRC.

IMO it should be documented, because other apps might also want a dark titlebar, especially if they have a built-in dark theme because the white titlebar becomes an eye sore.

@sylveon commented on GitHub (Oct 14, 2019): The API used is technically undocumented and got moved to `WCA_USEDARKMODECOLORS` in the also undocumented `SetWindowCompositionAttribute` API, IIRC. IMO it should be documented, because other apps might also want a dark titlebar, especially if they have a built-in dark theme because the white titlebar becomes an eye sore.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 30, 2019):

Hey! The fix for this went out in Windows in the Insider channel's Fast Ring with build 19013.

@DHowett-MSFT commented on GitHub (Oct 30, 2019): Hey! The fix for this went out in Windows in the Insider channel's Fast Ring with build 19013.
Author
Owner

@raddinet commented on GitHub (Oct 30, 2019):

The API used is technically undocumented and got moved to WCA_USEDARKMODECOLORS in the also undocumented SetWindowCompositionAttribute API, IIRC.

Thank you! Can confirm that such change works.

IMO it should be documented, because other apps might also want a dark titlebar, especially if they have a built-in dark theme because the white titlebar becomes an eye sore.

Exactly.

@raddinet commented on GitHub (Oct 30, 2019): > The API used is technically undocumented and got moved to `WCA_USEDARKMODECOLORS` in the also undocumented `SetWindowCompositionAttribute` API, IIRC. Thank you! Can confirm that [such change](https://github.com/raddinet/raddi/commit/a050e80c79e16a88980a549214d255197fe73225) works. > IMO it should be documented, because other apps might also want a dark titlebar, especially if they have a built-in dark theme because the white titlebar becomes an eye sore. Exactly.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 30, 2019):

We don't disagree with you.

@DHowett-MSFT commented on GitHub (Oct 30, 2019): We don't disagree with you.
Author
Owner

@sylveon commented on GitHub (Nov 16, 2019):

Finally got to update my insider build after windows update kept refusing, can confirm it works (third party apps are still broken so they'll have to move to SetWindowCompositionAttribute).

The code here also hasn't been updated 9b92986b49/src/interactivity/win32/windowtheme.cpp (L47)

@sylveon commented on GitHub (Nov 16, 2019): Finally got to update my insider build after windows update kept refusing, can confirm it works (third party apps are still broken so they'll have to move to `SetWindowCompositionAttribute`). The code here also hasn't been updated https://github.com/microsoft/terminal/blob/9b92986b49bed8cc41fde4d6ef080921c41e6d9e/src/interactivity/win32/windowtheme.cpp#L47
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4400