diff options
Diffstat (limited to 'src/client/util/platform')
-rw-r--r-- | src/client/util/platform/blankscreen.h | 3 | ||||
-rw-r--r-- | src/client/util/platform/blankscreen_X11.cpp | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/client/util/platform/blankscreen.h b/src/client/util/platform/blankscreen.h index 24c4969..8d8c9de 100644 --- a/src/client/util/platform/blankscreen.h +++ b/src/client/util/platform/blankscreen.h @@ -21,6 +21,9 @@ private: bool _locked; QString _message; BlankScreen_Sysdep* _sysdep; + +private slots: + void timer_moveToTop(); }; #endif diff --git a/src/client/util/platform/blankscreen_X11.cpp b/src/client/util/platform/blankscreen_X11.cpp index 1f36f89..ee644ca 100644 --- a/src/client/util/platform/blankscreen_X11.cpp +++ b/src/client/util/platform/blankscreen_X11.cpp @@ -4,6 +4,7 @@ #include <QApplication> #include <QProcess> #include <QDesktopWidget> +#include <QTimer> #include <X11/Xlib.h> #include <X11/cursorfont.h> @@ -26,6 +27,9 @@ BlankScreen::BlankScreen() : QDialog(NULL) setStyleSheet("background-color:#000"); _locked = false; + QTimer *upper = new QTimer(this); + connect(upper, SIGNAL(timeout()), this, SLOT(timer_moveToTop())); + upper->start(1111); } BlankScreen::~BlankScreen() @@ -86,3 +90,11 @@ bool BlankScreen::unlock() _locked = false; return true; } + +void BlankScreen::timer_moveToTop() +{ + if (this->isHidden()) + return; + activateWindow(); + raise(); +} |