[Panel-devel] Tray icons not appearing

Lubos Lunak l.lunak at suse.cz
Fri Nov 23 15:52:42 CET 2007


On Friday 23 of November 2007, Aaron J. Seigo wrote:
> On Thursday 22 November 2007, Jason Stubbs wrote:
> > Anybody care to puzzle this one out?

 The difference in the attached patch is 
that "KUniqueApplication(checkComposite() ? dpy : dpy, visual ? 
Qt::HANDLE(visual) : 0, colormap ? Qt::HANDLE(colormap) : 0)" is broken code. 
Order of evaluating arguments for a function is not defined, so here first 
2nd and 3rd one are evaluated and only then checkComposite() is called -> 
Plasma runs without ARGB visuals in such case.

> evidently something about setting an argb visual on the app is screwing up
> the system tray. this is Not Good and hopefully isn't generic to QXEmbed.

 Wrong :(. Unfortunately it isn't generic to QXEmbed. It is Yet Another case 
of things breaking because of hacked-in ARGB visuals.

 From manpage for XReparentWindow() : "A BadMatch error results if: ... The 
specified window has a ParentRelative background, and the new parent window 
is not the same depth as the specified window." For those untouched by Xlib:
- XEmbed uses XReparentWindow() for embedding
- Other apps usually use windows with normal default depth for systray icons, 
not ARGB visuals, which are used by everything in Plasma
- Background set to ParentRelative achieves making systray icons use the same 
background like the systray.

 (This problem is not caught because currently the only error handling in 
SystemTrayWidget is a TODO note and because there are some rather pitiful 
pieces of code in QX11EmbedContainer, for example broken error handling :(. 
TT will get a long patch when I get to going through it.)

 The attached is an ugly workaround for it. I'm not sure if there is a good 
way of handling it. Depends also on whether Qt::transparent not working 
QX11EmbedContainer is just a consequence of this problem or whether it's 
unrelated.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemtraywidget.cpp.patch
Type: text/x-diff
Size: 645 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071123/ead85e80/attachment.bin 


More information about the Panel-devel mailing list