KNotifications and the system tray
Lubos Lunak
l.lunak at suse.cz
Mon Nov 5 16:21:04 GMT 2007
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.
> 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.
--
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
More information about the kde-core-devel
mailing list