Background color handling changed between 1.1 and 1.2 #10590

Open
opened 2026-01-31 02:25:18 +00:00 by claunia · 0 comments
Owner

Originally created by @thomthom on GitHub (Sep 11, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.900] and Microsoft Windows [Version 10.0.19041.450]
Windows Terminal version (if applicable):

Any other software?
PDCurses: https://github.com/wmcbrine/PDCurses @ 618e0aa

Steps to reproduce

Related to the same PDCurses based application that prompted me to report #7594 I found something else. The background handling in Windows Terminal changed between 1.1 and 1.2.

In my app I declare a custom color:

  #define SW_COLOR_DEBUG 100
  init_color(SW_COLOR_DEBUG, 500, 500, 500);
  init_pair(1, SW_COLOR_DEBUG, COLOR_BLACK);

Expected behavior

What I saw in WT 1.1 was what this:

wt-1 1

I wasn't sure if it would work like that, since I had custom non-black background, but I had hoped the black color was remapped.
COLOR_BLACK is defined as 0 in PDCurses, I didn't find any way to set no color.

Actual behavior

In WT 1.2 I'm now seeing actual black.

wt-1 2

I'm not 100% sure what is technically correct here, if I'd seen WT1.2 first I would have assumed my code was wrong, but since there's behaviour change between 1.1 I figured I'd report this.

Originally created by @thomthom on GitHub (Sep 11, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.900] and Microsoft Windows [Version 10.0.19041.450] Windows Terminal version (if applicable): ``` Any other software? PDCurses: https://github.com/wmcbrine/PDCurses @ [618e0aa](https://github.com/wmcbrine/PDCurses/commit/618e0aaa31b4728eb4df78ec4de6c2b873908eda) # Steps to reproduce Related to the same PDCurses based application that prompted me to report #7594 I found something else. The background handling in Windows Terminal changed between 1.1 and 1.2. In my app I declare a custom color: ``` #define SW_COLOR_DEBUG 100 init_color(SW_COLOR_DEBUG, 500, 500, 500); init_pair(1, SW_COLOR_DEBUG, COLOR_BLACK); ``` # Expected behavior What I saw in WT 1.1 was what this: ![wt-1 1](https://user-images.githubusercontent.com/192418/92892755-5673a280-f419-11ea-92ae-ba628e6902dc.png) I wasn't sure if it would work like that, since I had custom non-black background, but I had hoped the black color was remapped. `COLOR_BLACK` is defined as `0` in PDCurses, I didn't find any way to set no color. # Actual behavior In WT 1.2 I'm now seeing actual black. ![wt-1 2](https://user-images.githubusercontent.com/192418/92893014-963a8a00-f419-11ea-81a0-bbf4d3e77507.png) I'm not 100% sure what is technically correct here, if I'd seen WT1.2 first I would have assumed my code was wrong, but since there's behaviour change between 1.1 I figured I'd report this.
claunia added the Resolution-By-DesignNeeds-Tag-Fix labels 2026-01-31 02:25:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10590