System tray "close" dialog needs work

Sébastien Laoût slaout at linux62.org
Wed Jan 5 21:15:01 GMT 2005


By seeing the screenshot (theire is no black border surrounding the
screenshot), aKregator include an old version of the systray dialog.

I am the one who programmed it.
I posted (here) a version that make some checks and don't show the
screenshot if it detects it's not visible...

But nobody replied.

Since not all problems are fixed (and I don't see how to solve them all)
I assumed it's not mature to be included in KDE libs.

I attach the last version of the dialog.
(don't be careful of the name "2": it's just for easy insertion in my
program.)

Le mer 05/01/2005 à 20:58, Aaron J. Seigo a écrit :
> you should be able to check isVisible() on the icon to see if the user has 
> hidden it, though this probably won't help in the case of hidden panels (they 
> are "visible", but off-screen). so in addition to checking isVisible(), one 
> would also likely have to see if the current coordinates are within the 
> screen rect... 

This is done in that version (part 2. and 3.).
So, this is OK.

The last problem I'l faced to:
I failed to raise the kicker (or other systray manager) if it's hidden:

* I've tryed to use kapp->widgetAt(g) (where g is a corner of the icon
(a QPoint)), but it doesn't work since the widget is not in the current
app (althrouth KSystemTray is a QLabel).
So: no way to test if the kicker is raised/visible or not.

* I also tryed to raise in <in any circumstance>, but it doesn't want:
it is alwayse raised after the dialog is shown, no matter if I call
sleep(1), kapp->proccessEvents() multiple times...

* And the sleep(1) is not acceptable by users!!

This configuration should be rare (ie. windows are allowed to be above
kicker, or systray manager is on the desktop, eg. a SuperKaramba
script...).
But that's not solvable.

Until we use X.Org XComposite extension...

Best regards,

Sébastien Laoût.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksystemtray2.cpp
Type: text/x-c++
Size: 6178 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050105/f74f6066/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksystemtray2.h
Type: text/x-c-header
Size: 674 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050105/f74f6066/attachment-0001.bin>


More information about the kde-core-devel mailing list