System Tray Configuration

Lubos Lunak l.lunak at suse.cz
Tue Nov 30 14:03:23 GMT 2004


On Tuesday 30 of November 2004 13:53, Lubos Lunak wrote:
> On Monday 29 of November 2004 19:43, Aaron J. Seigo wrote:
> > On Monday 29 November 2004 06:44, Martin Koller wrote:
> > > Hi list,
> > >
> > > in the systray configuration dialog, I can not for all systray embedded
> > > apps see the correct icon (instead I see the generic X11 icon).
> > > Specifically this is true for the klaptopdaemon, which is a kded module
> > > (... guessing: and therefore has no main window and no icon associated
> > > with it).
> > > As the systray applet gets the members and the icons somehow from
> > > kwin_module, is there also a way to get the icon which is currently
> > > shown in systray ?
...
> > the best thing is for the entries that don't have an icon to provide one.
> > you don't need a main window AFAIK, just set the icon for the systray
> > icon "window".
>
>  Actually, according to the XDG systray spec[*], the systray windows should
> provide _NET_WM_NAME, WM_CLASS and _NET_WM_ICON properties. Qt already sets
> WM_CLASS, I could add setting of _NET_WM_ICON and _NET_WM_NAME to
> KSystemTray, the system tray applet could fetch it using the KWin kdecore
> class then.
>
>  Icon could be handled by overriding KSystemTray::setPixmap(), that'd be
> enough to have icons. I'm not sure how to set _NET_WM_NAME ( ~ window
> title) automatically, any ideas?
>
> [*] which happens to be unreachable at the present time, just like other
> specs at fd.o

 Attached patches add support for icon and caption for systray icons. There 
should be no problem with icons, it will simply get the same icon as will be 
shown. I'm still not quite sure about the caption, now the dialog shows e.g. 
'KDE Keyboard Tool' (i18n-ed) instead of 'kxkb', which is IMHO better, but 
this is not guaranteed to be a constant string. Maybe internally 
KWin::WindowInfo::windowClassClass() should be remembered.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksystemtray.cpp.patch
Type: text/x-diff
Size: 1030 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041130/c31a24fb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksystemtray.h.patch
Type: text/x-diff
Size: 743 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041130/c31a24fb/attachment-0001.patch>


More information about the kde-core-devel mailing list