KNotifications and the system tray

Olivier Goffart ogoffart at
Mon Nov 5 16:52:39 GMT 2007

Le lundi 5 novembre 2007, Lubos Lunak a écrit :
> On Monday 05 of November 2007, Olivier Goffart wrote:
> > Le lundi 5 novembre 2007, Will Stephenson a écrit :
> > > In KDE 3, Kopete used to show notifications (passive popups mainly)
> > > adjacent to its system tray icon.  In KDE 4 this is no longer possible
> > > because the KSystemTray is no longer a QWidget, so it doesn't have a
> > > winId() method, nor can it be passed to KNotification::event( QWidget
> > > *, ... );
> > >
> > > What was the background to this change (portability)
>  Presumably other platforms internally don't use a window to represent to
> tray icon. And it's not possible to get the internal QWidget on X11, even
> using ugly hacks :-/.
> > > and what is the way
> > > to do it now instead?  The requirement to notify at/near a systray icon
> > > is still present.
> >
> > The plan was to make popup appears in a corner of the screen. placing
> > them one on top of the other in order to not overlap eachothers.
>  I hope KNotification in KDE4 is not just a glorified KPassivePopup. Other
> ways of notifying may need a reference to originating window.

KNotify know the originating widget. (but it is the window, not the systray 
It is now mainly used in order to flash the taskbar.
It is also used to automatically close the notification when the widget 
becomes active.  Or raise the widget when the Popup is clicked.

> > I don't think it is required to have them link directly to the
> > application tray icon, specially because the application icon is in the
> > popup.
> >
> > Now, I may understand you want the queue of the speech balloon touch the
> > application's tray icon.
> > In order to do that, knotify need to know the position of the systray of
> > the application.
> > Would KWin help in that case ?
>  No, the systray is only between the application and the systray container.
> As already pointed out there's geometry(), but I think the right way would
> be to make TT add QWidget* QSystemTrayIcon::internalWidget(). I think I
> could handle the ugly hacks in qt-copy.

Then the application (kdelibs) should send a dbus call that tell the systray 
coordinate to knotify.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list