Summary: | multiple idle dialog boxes | ||
---|---|---|---|
Product: | [Applications] ktimetracker | Reporter: | Bryan Larsen <bryan> |
Component: | general | Assignee: | Thorsten Staerk <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mh+kde-bugs |
Priority: | NOR | ||
Version: | Git (master) | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Bryan Larsen
2008-11-04 23:01:00 UTC
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 |