summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohann Latocha2011-06-02 17:39:09 +0200
committerJohann Latocha2011-06-02 17:39:09 +0200
commit36b04887d8a6930ca32d2aceed24a1f9cafc1c8f (patch)
tree7a46796adeae3c0060576d7abfafb758cd839735 /src
parentDefect #819 (diff)
downloadpvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.tar.gz
pvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.tar.xz
pvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.zip
[PVSGUI] Disable screensaver on connection
Diffstat (limited to 'src')
-rw-r--r--src/pvsgui.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pvsgui.cpp b/src/pvsgui.cpp
index 5359449..5ae3db6 100644
--- a/src/pvsgui.cpp
+++ b/src/pvsgui.cpp
@@ -338,6 +338,17 @@ void PVSGUI::connected(QString host)
_trayIcon->setIcon(QIcon(":cam_on32.svg"));
_trayIcon->setToolTip(tr("Connected to ") + host);
}
+
+ // try to disable screensaver
+ if (QProcess::execute("xscreensaver-command -exit") == 0)
+ qDebug("xscreensaver disabled");
+ else
+ qDebug("xscreensaver NOT disabled");
+
+ if (QProcess::execute("gnome-screensaver-command --exit") == 0)
+ qDebug("gnome-screensaver disabled");
+ else
+ qDebug("gnome-screensaver NOT disabled");
}
void PVSGUI::disconnected()