PDA

View Full Version : Which Virtual Desktop am I running on?



onamatic
24th November 2008, 17:04
Linux KDE QT4.4

When I click my app's systray icon it pops up a dialog. If I am not working on the virtual desktop the app is running on, the app and hence the dialog are hidden.

I want to switch to the virtual desktop automatically:


system("dcop kdesktop KDesktopIface switchDesktops theDesktopMyAppIsRunningOn");

How can I find "theDesktopMyAppIsRunningOn"?

Any suggestions please?
NOTE: Using a QDesktopWidget :


QDesktopWidget *desk = QApplication::desktop();

qDebug() << "Desktop is virtual? " << desk->isVirtualDesktop();

says : Desktop is virtual? false so I'm thinking QT isn't "virtual desktop aware".