Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TitleStyle Active Colorset fg color apparently ignored #1048

Closed
edanaher opened this issue Jul 11, 2024 · 4 comments
Closed

TitleStyle Active Colorset fg color apparently ignored #1048

edanaher opened this issue Jul 11, 2024 · 4 comments
Labels
skip:changelog Issue/PR should skip CHANGELOG type:bug Something's broken!

Comments

@edanaher
Copy link

Upfront Information

Please provide the following information by running the command and providing
the output.

  • Fvwm3 version (run: fvwm3 --version)
fvwm3 1.0.9 (released)                                                          
with support for:  ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, XRandR, 
XRender, XCursor, XFT, NLS                           
  • Linux distribution or BSD name/version

NixOS unstable

  • Platform (run: uname -sp)

Linux unknown

Expected Behaviour

When using colorsets, the fg attribute should be used for the titlebar text in both active and inactive windows.

Actual Behaviour

It looks like the fg attribute on the colorset is ignored for active windows. A fairly minimal excerpt from my config, with tweaks to make the issue more obvious:

CleanupColorsets
Colorset 1 VGradient 20 rgb:70/70/70 rgb:3/3/3 # Inactive
Colorset 1 fg rgb:f/4/4
Colorset 2 Vgradient 20 rgb:6/9/C rgb:33/48/66 # Active
Colorset 2 fg rgb:f/4/4

# Make the title text huge to make it easier to see the color
Style * Font 'xft:Sans-16'

TitleStyle InActive Colorset 1
TitleStyle Active Colorset 2
BorderStyle InActive Colorset 1
BorderStyle Active Colorset 2

# Fix for fvwm2
#Style * ForeColor rgb:f/4/4, HilightFore rgb:f/4/4

# "Fix" for fvwm3, but also impacts menu color
#Colorset 0 fg White

In this case, inactive windows have red title text, but the active window title text is black. Oddly, fvwm2 also had this issue; I added a workaround ages ago that I forgot about (commented out above). That no longer works in fvwm3, though changing the default colorset does fix the issue, but has other effects.

AFAICT, it's just active windows that are impacted, and changing the color set numbers doesn't seem to impact that bug. I suspect that whatever special handling fvwm2 had for the HilightFore may be related.

It's also entirely possible that this is how ColorSets are supposed to work; I've never fully understood them, but this seems like inconsistent behavior that inactive windows are affected by the fg color, but the active one isn't.

Steps to Reproduce

The config file provided above is pretty minimal, and behavior is similar but easier to work around in fvwm2.

@edanaher edanaher added the type:bug Something's broken! label Jul 11, 2024
@somiaj
Copy link
Collaborator

somiaj commented Aug 28, 2024

I think the issue is that TitleStyle and BorderStyle don't fully set the colorsets like you think they should. You should look at the Colorset, HilightColorset, BorderColorset, and HilightBorderColorset styles.

The fvwm3 internal defaults are Style * Colorset 1, HilightColorset 0, that is why issuing the Style * ForeGround ... or changing colorset 0 fix the issue (since 0 is the default HilightColorset). The follow will work for both fvwm2 and fvwm3.

Style * Colorset 1, HilightColorset 2

I don't know if this is a bug, the colorset settings created by TitleStyle and BorderStyle are not the same as the ones created by Style, and the text (fg) always uses the colorset created by Style. Really Decors need redone, but until then make sure you also set the colorsets using a Style * command too.

There might be something to look into here, but this may require an overhaul on things work.

@somiaj
Copy link
Collaborator

somiaj commented Aug 29, 2024

To add to this, here is an expert from the manual page (though kinda hard to find):

"Earlier versions allowed to use the HilightColorset and WindowFont commands in decors. This is no longer possible. Please use the Style command with the HilightColrset and Font options."

I suspect this applies here too, The font and its foreground color of the active window must now be only set though the Style command. So it seems at least somewhat intentional that the font gets its color from the Style and not the Decor (TitleStyle).

@edanaher
Copy link
Author

Thanks for that information! I'll try to test it out in the next couple days.

@ThomasAdam ThomasAdam added the skip:changelog Issue/PR should skip CHANGELOG label Oct 1, 2024
@ThomasAdam
Copy link
Member

I'll close this. @edanaher -- feel free to reopen if there's any other issues.

@ThomasAdam ThomasAdam closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip:changelog Issue/PR should skip CHANGELOG type:bug Something's broken!
Projects
None yet
Development

No branches or pull requests

3 participants