summaryrefslogtreecommitdiffstats
path: root/src/client/util/platform
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/platform')
-rwxr-xr-xsrc/client/util/platform/blankscreen.h1
-rwxr-xr-xsrc/client/util/platform/blankscreen_X11.cpp12
2 files changed, 13 insertions, 0 deletions
diff --git a/src/client/util/platform/blankscreen.h b/src/client/util/platform/blankscreen.h
index 8ed4c04..e42043c 100755
--- a/src/client/util/platform/blankscreen.h
+++ b/src/client/util/platform/blankscreen.h
@@ -3,6 +3,7 @@
#include <QString>
#include <QDialog>
+#include <QDebug>
class BlankScreen_Sysdep;
diff --git a/src/client/util/platform/blankscreen_X11.cpp b/src/client/util/platform/blankscreen_X11.cpp
index 69b6d8c..cee8f03 100755
--- a/src/client/util/platform/blankscreen_X11.cpp
+++ b/src/client/util/platform/blankscreen_X11.cpp
@@ -1,6 +1,8 @@
+
#include "blankscreen.h"
#include <QApplication>
+#include <QProcess>
#include <QDesktopWidget>
#include <X11/Xlib.h>
@@ -52,6 +54,11 @@ bool BlankScreen::lock(const QString& message)
XGrabKeyboard(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy) , false, GrabModeAsync, GrabModeAsync, CurrentTime);
XGrabPointer(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy) , false, 0, GrabModeAsync, GrabModeAsync, None, 0, CurrentTime);
+
+ QProcess ungrabP;
+ ungrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/lock.sh");
+ ungrabP.waitForFinished();
+
_locked = true;
return true;
}
@@ -70,6 +77,11 @@ bool BlankScreen::unlock()
XFlush(_sysdep->dpy);
+ /* start the unlock.sh script */
+ QProcess regrabP;
+ regrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/unlock.sh");
+ regrabP.waitForFinished();
+
_locked = false;
return true;
}