GNOME Bugzilla – Bug 439417
"glow" doesn't work with alpha
Last modified: 2007-06-20 22:29:27 UTC
if you put a wncktasklist inside of a window with an rgba background then wnck_task_button_glow () doesn't work properly. it copies only the r/g/b channel of the button which, in the case of a fully-alpha background, is just black. this could probably be done properly with cairo functions instead of gdk_pixbuf ones. you'd gain the advantage that the compositing is done server-side and possibly with the help of hardware.
Created attachment 88388 [details] screenshot of the badness
Created attachment 90343 [details] [review] First try Does this help? I don't this part of the code well, so I'm not sure that's enough. (patch is mixed with the patch for bug 412887, but it doesn't matter)
Also, I'd love to do this in cairo, but my cairo-fu is... well... you know what I mean :-)
The gdk_rectangle_intersect() is not equivalent to the code that was there before, though I don't remember why what was there before was like it was. I doubt the patch makes any difference - this may require a fix to get_from_drawable such that it copies the alpha channel (or copies the composited result from the screen? I don't know how this would be done) I'd suggest asking one of the people who knows a lot about the new X features (RGBA, composite) I'm not sure Cairo is helpful, since the issue here is taking the screenshot (afaik cairo doesn't do that)
my suggestion was to avoid taking the screenshot at all. cairo probably has the appropriate support for performing the image transformation server-side.
Created attachment 90367 [details] [review] implement glowing using cairo - first try here's a patch to implement the glow using cairo. i've also included a -t (--transparent) option to the test-tasklist program so you can try it out.
Created attachment 90368 [details] the effect with the patch
Thanks Ryan! I didn't commit the test-tasklist part. Feel free to update this part of the patch (detect if there's a compositing manager, and don't make it 100% transparent ;-)) Havoc: the gdk_rectangle_intersect() change was an attempt to fix bug 412887, but it doesn't fix it.
Created attachment 90373 [details] [review] the changes now 50% transparent (white background) if COMPOSITE extension is missing or a compositing manager is not present then we just set the relief type to none but don't actually make the window transparent. cheers.
Thanks!