Version: 4.0.0 (using 4.1.2 (KDE 4.1.2), Kubuntu packages) Compiler: cc OS: Linux (i686) release 2.6.27-7-generic To reproduce: "Detect desktop as idle after:" set to 1 minute (just to make this test easier). Three tasks defined, each of which are set to auto track the corresponding virtual desktop. KTaskTimer is running on desktop 1. - switch to desktop 2 - idle for a couple of minutes - switch to desktop 3 - idle for a couple of minutes - return to desktop 1 On desktop 1 you will find two idle dialog boxes.
Confirmed - I have no idea how to put a message on the active virtual desktop. That is the sense of a virtual desktop, that not every application can access every virtual desktop.
Maybe this brings the solution: http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKWindowSystem.html#252fc7c6e389a41b73075a98d4bb843a
This is the perfect fix for the bug, the only failing is that it does not work: Index: idletimedetector.cpp =================================================================== --- idletimedetector.cpp (revision 900452) +++ idletimedetector.cpp (working copy) @@ -33,6 +33,7 @@ #include <KLocale> // i18n #include <kdebug.h> +#include <KWindowSystem> #ifdef Q_WS_X11 #include <QX11Info> @@ -124,6 +125,7 @@ dialog->setButtonWhatsThis(KDialog::Ok, explanation); dialog->setButtonWhatsThis(KDialog::Cancel, explanationrevert); dialog->show(); + KWindowSystem::self()->setOnDesktop( wid->winId(), KWindowSystem::self()->currentDesktop() ); } #endif // HAVE_LIBXSS
WOHOOT@! This worx now: Index: idletimedetector.cpp =================================================================== --- idletimedetector.cpp (revision 900452) +++ idletimedetector.cpp (working copy) @@ -33,6 +33,7 @@ #include <KLocale> // i18n #include <kdebug.h> +#include <KWindowSystem> #ifdef Q_WS_X11 #include <QX11Info> @@ -123,6 +124,10 @@ dialog->setButtonText(KDialog::Cancel, i18n("Revert timing")); dialog->setButtonWhatsThis(KDialog::Ok, explanation); dialog->setButtonWhatsThis(KDialog::Cancel, explanationrevert); + KWindowSystem::self()->setOnDesktop( dialog->winId(), KWindowSystem::self()->currentDesktop() ); + KWindowSystem::self()->demandAttention( dialog->winId() ); + kDebug(5970) << "******************************************************************"; + kDebug(5970) << "Setting winId " << dialog->winId() << " to deskTop " << KWindowSystem::self()->currentDesktop(); dialog->show(); } #endif // HAVE_LIBXSS
SVN commit 900568 by tstaerk: Pop up the idle time detector on the desktop the user is actually looking at. BUGS:174301 M +5 -0 idletimedetector.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=900568
*** Bug 84510 has been marked as a duplicate of this bug. ***