GNOME Bugzilla – Bug 306974
[patch] transparency support for notification area icons
Last modified: 2006-07-28 21:29:30 UTC
notification area icons are one of the few things left on the panel that are not yet transparent. the attached patch is a backward and forward compatible change to both the client and server side of libegg to implement transparency support similar to what the panel does (in fact, a lot of the code is taken straight from libpanel-applet). kde (and other) interop is not broken by these changes.
Created attachment 47484 [details] [review] bury the patchet.
Created attachment 47485 [details] screencap I forgot to mention that I also copied the modified eggtraymanager.[ch] into the notification area applet (and added some support) and then copied the new eggtrayicon.[ch] into gossip and a little mail notification app that I wrote. It looks pretty much like you'd expect...
How is this different from my patch on bug 150726 ?
Created attachment 47616 [details] the difference I tried your patch from bug 150726. It made no visible difference for me (or, at least, didn't change what I was looking for). The notification icon in this attachment has 3 icons in it. The left-most is my mail notification app using the patch in bug 150726. The middle icon is the same app using this patch (and of course, Gossip on the right also using this patch).
So, basically this should work when I patch the systray applet and the application that's supposed to have a transparent icon, yes? I just tried it with rhythmbox (and yes, after installing the new versions of panel and rb i logged off and on) and it doesn't seem to work. Is your mail notification available somewhere so I can try it out with that app?
Ryan, just to make sure: your solution consists of passing a "pixmap of a background for you to draw on" from the notification area to the individual icon-holding apps?
Yes. it works exactly like the applets work for their transparency. Unfortunately, I seem to have lost the patch to the notification icon applet so this is currently a half-solution. Shouldn't be too hard to whip it up again though but right now I'm quite busy with other things.
I'll add my request for this functionality. The current non-transparent backround behind the notification icons looks hokey. Thanks.
No change on that patch. Ccing Vincent, maybe you could have a look on the patch and commit it, that's something panel-ish for you ... :)
is that doing the same job as the patch from bug #100600 by example?
bug 100600 seems to be using a method that was done by someone else and failed (ie: there were a lot of cases that it didn't handle properly). _however_ the patch currently in bug 100600 seems to be a bit better in that it hooks the expose event handler. i think that maybe this will solve the problem but i'm not sure. the one case that might still be broken is the case of the contents of the icon changing. if this doesn't generate a synthetic expose event then i think in that case the background may not be properly repainted (ie: the new icon will overlap the old icon if they have different shapes/sizes). my question (which hopefully vincent knows the answer to): why do applets do the transparency the way that they do? is it simply because the person who originally wrote the code didn't know that the approach in bug 100600 was possible or is it because the approach in bug 100600 is broken? my approach is essentially identical to how applets work. the answer to this question should be the deciding factor on if my code or the bug 100600 code gets included. if the answer is that the applets work in a silly way then we should also reevaluate how the applets make themselves transparent.
(In reply to comment #11) > why do applets do the transparency the way that they do? is it simply because > the person who originally wrote the code didn't know that the approach in bug > 100600 was possible or is it because the approach in bug 100600 is broken? my > approach is essentially identical to how applets work. > > the answer to this question should be the deciding factor on if my code or the > bug 100600 code gets included. if the answer is that the applets work in a > silly way then we should also reevaluate how the applets make themselves > transparent. So, err, I don't know the answer. However, I do know that this patch won't work for people not using our implementation of EggTrayIcon (eg, people using Qt). Thinking about it again, setting the background pixmap to NULL for applets might not be enough since applets are not "simple" icons, but much more than this. So in some cases, it might not work.
People are using patch in bug 150726. Let's say this solution is not the one people are using and close this bug. *** This bug has been marked as a duplicate of 150726 ***