Repository: qtile/qtile

Issue:
different window border on tiled focused terminal windows with compositing
I'm running debian stretch amd_64.
if I enable compositing (I tried xcompmgr, compton and unagi) I see that the border of focused tiled terminal windows is of a sort of yellow, while should be red according to the layout settings.

I have an other machine which is running debian jessie x86, and I'm not able to reproduce this issue there...
I thought it could be a video driver issue, but it's not because I still have the problem while using the vesa driver.

the issue afflicts all terminal emulators I tried with transparency support (even if it's not enabled) [terminator, lxterm, roxterm, sakura and others...].
with urxvt is present only if I enable true transparency, while if I use fake transparency there's no issue. So it must be something related with transparent windows...

I have the issue also with xmonad wm, so I don't think this is a qtile specific problem since everything works on debian jessue x86, but if you please try to reproduce this issue on your desktop we could get an idea of where the problem is...



Discussion:
Yes, some transparency is added to borders when using a compositor.

I never seen that as a bug, and actually had fun with this. But it should definitely be something configurable, and as far as I know it is currently not.

Old thread. But if anyone could point me to the location in the code where this transparency is set I would be grateful. This is annoying the hell out of me.

Thanks!
Tried to take a look and honestly, I've no idea. That might be some sort of default somewhere.
While digging I found this: http://lists.schmorp.de/pipermail/rxvt-unicode/2009q1/000907.html

Doesn't really tell me much but someone with a better understanding of X might be able decipher it?
I confirm. I have same problem, but not with all terminal applications.
I was discusing about this with picom(compton)
https://github.com/yshui/picom/issues/285
@flacjacket @ramnes Hi, I`ve created issue on picom github page some time ago.

yshui investigated it and now there are some results:

> yshui: The window border have a color whose alpha value is 0, causing the border to be rendered improperly, because picom expects a premultiplied color

Maybe this solve problem on other compositing managers too?
Hello,

has anybody found any solution in this regard? For me the problem with semi-transparent windows occur when I use alacritty or termite. However border looks as expected with kitty.
having the same issue with alacritty while using picom. seems to be a trend lol. an option to set window opacity, but also border opacity would be nice. i mean kwin in KDE lets you do this
@ramnes On dwm this helped.
https://github.com/szatanjl/dwm/commit/1529909466206016f2101457bbf37c67195714c8#commitcomment-40149107

Maybe it could help here too?
Same issue with alacritty terminal when I enable picom I don't get the desired border color only white.
@nemya9066 probably because you have somewhat light wallpaper im guessing?
that was it for me atleast. not really anything to fix it atm i think tho.

its just super annoying for me aswell that the opacity on the borders are so low that it basicly absorbs the wallpaper background  😕 and with no way of adjusting just the broders
@waltereikrem  you're right if I change the wallpaper to a dark one the border colors finally appears I was going nuts trying to figure out why sometimes my border will show and other time it will not.
This is so annoying how is this considered a feature If I set a color as the border that mean that I want to see exactly that color most user use the border around the window to DISTINGUISH the focused window from the rest it boggles my mind the devs think of this as a feature...
can someone at least point us to where this "feature" is set in the code so we can remove it.
It's not a feature, it's a bug. Do not run a compositor and you won't encounter this problem.
> Do not run a compositor and you won't encounter this problem.

yeah thats not really a fix tho. is there a plan to fix this in the future? i mean its a 5yo bug, i know its set as low priority...but 5 years? xD

Contributions welcome.

Resolving patch:
diff --git a/libqtile/core/manager.py b/libqtile/core/manager.py
--- a/libqtile/core/manager.py
+++ b/libqtile/core/manager.py
@@ -497,7 +497,8 @@ def register_widget(self, w):
 
     @functools.lru_cache()
     def color_pixel(self, name):
-        return self.conn.screens[0].default_colormap.alloc_color(name).pixel
+        pixel = self.conn.screens[0].default_colormap.alloc_color(name).pixel
+        return pixel | 0xff << 24
 
     @property
     def current_layout(self):


Test patch: