qtile: Mirrored widgets on multi-display get wrong background transparency

Issue description

I’m trying to use the advised way of putting the same widget on multiple bars (displays). That means I define a widget object like this:

widget_volume = widget.PulseVolume(
  fmt="󰕾 {}",
  mouse_callbacks={"Button3": lambda: qtile.spawn("pavucontrol")},
  limit_max_volume=True,
  background="#242936" + "99",
  **powerline_left,
)

Note that for clarity I have separated out the alpha channel from the background color.

After this, I add this widget variable to multiple Bar objects:

screens = []
  for monitor in range(monitors):
      screens.append(
        Screen(
          top=bar.Bar(
            widgets=[
...
              widget.Sep(
                  background="#242936" + "99",
                  size_percent=60,
              ),
              widget_volume,
...

On Screen 1, this works fine, but on Screens 2 and 3 the same widget gets a weird background transparency. Please see the screenshots below for what I mean. All widgets except the volume widget are declared inside the bar and they get the correct background color and transparency.

Screen 1: Screenshot_2023-11-24_09-11-1700815250 Screen 2: Screenshot_2023-11-24_09-11-1700815269 Screen 3: Screenshot_2023-11-24_09-11-1700815282

I have tried modifying the transparency part (“99”) to fully opaque (“ff”) and fully transparent (“00”) and those show as expected on all screens. It’s just with partial transparency that the calculation seems to be off on my 2nd and 3rd screen.

Additionally, as you can see these screenshots are when using the powerline decoration from qtile_extras, but the same happens when using the widgets from qtile proper.

Version

Current master (551269802) + PR 4525 patch

Backend

Wayland (experimental)

Config

No response

Logs

No response

Required

  • I have searched past issues to see if this bug has already been reported, and it hasn’t been.
  • I understand that people give their precious time for free, and thus I’ve done my very best to make this problem as easy as possible to investigate.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 15 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Confirmed, that fixes it. Thank you!