-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Julien Danjou wrote:
> At 1259268098 time_t, lukash wrote:
>> Thats great! You just set the background pixmap to a pixmap of what's
>> drawn under it, right? I've been thinking for the whole day how it
>> sucks that this wasn't possible, because the solution suggested before
>> would not even allow for a textbox and an imagebox class in Lua, there
>> would only be the wibox with both properties...
>
> Well, windows are stacked
> root window -> wibox1 -> {wibox2, wibox3}
>
> wibox1 set its background as root window pixmap, and then draw on top of
> it. wibox2 copy the content of wibox1, and draw on top of it. wibox3
> does the same.
>
> Of course wibox2 and wibox3 are on the same layer in term of parenting,
> they have a common parent, so they can overlap, but the transparency
> won't work (you may see that on the video, but it's poor quality).
>
> So it's not *real* transparency, but it works at least if no wibox with
> the same parent are on top of each other... which should be the common
> use case!
>
>> Is it feasible to have this on every out of 40 wiboxes though? no
>> performance impact?
>
> Performance impact is very low:
>
> 218 if(bg.alpha != 0xff)
> 219 {
> 220 if(wibox->parent->pixmap)
> 221 xcb_copy_area(_G_connection, wibox->parent->pixmap,
> 222 wibox->pixmap, _G_gc,
> 223 wibox->geometry.x + wibox->border_width,
> 224 wibox->geometry.y + wibox->border_width,
> 225 0, 0,
> 226 wibox->geometry.width, wibox->geometry.height);
> 227 else
> 228 /* no background :-( draw background color without alpha */
> 229 bg.alpha = 0xff;
> 230 }
Yay, you are brilliant. :)
I like this idea. It's not perfect but it's rather easy.
One thing though: Any idea what to do if wibox->parent->need_update is set? (AKA
the pixmap being outdated)
Or are you working your way downwards from the top-level wiboxes?...
Uli
- --
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBCAAGBQJLDvcyAAoJECLkKOvLj8sGFRcH/1OWBPBTR8ggxMrteLrByEU3
ED9ohn9V145cCTigGzdi489eO7gMsbPtXFqE4q7lYe2dYTko2yFYGiSjBetuFBPb
8t+f0OhlVBOx2HdqNjrkFTmSKPzB40tpN4z7fUBFQG5W6auG2Sm1mwURP9zfMkCB
eNRozYArzLdSEgZZmbzti63R/JYUtQSKeFcQ6baLkzoF+Vd4iBCsH1lQQT7FYnfU
qVSwXfmVvyMm5Ab8HW6K4tc+lgv8wejWM1a/SM3grnXyjRhDiPFX1/O2t8/zFZSs
hIQu1iuCRr3FAmH5EQEo+s0fYuc0HjFcfuxp6SEFhMNnue71Z1vdrCxjgJvXQp8=
=T9fH
-----END PGP SIGNATURE-----
--
To unsubscribe, send mail to [email protected].