aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-07-19 18:47:39 +0000
committerWeblate <noreply@weblate.org>2017-07-19 18:47:39 +0000
commit86f6fadf45c2b87749cffac82411d2371448da53 (patch)
treedfc1520b8ae2e59118b8a65d3f9438c1eead6b2c /src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
parentAdd en_GB (diff)
parentAnother checkpoint in the compositing saga. Got most of it working, but still... (diff)
downloadlumina-86f6fadf45c2b87749cffac82411d2371448da53.tar.gz
lumina-86f6fadf45c2b87749cffac82411d2371448da53.tar.bz2
lumina-86f6fadf45c2b87749cffac82411d2371448da53.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
index 3dcbf85e..bfcfa54d 100644
--- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
@@ -8,7 +8,7 @@
#include <QScreen>
#include <QApplication>
-#define DEBUG 1
+#define DEBUG 0
LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::WindowStaysOnTopHint){
starttimer = new QTimer(this);
@@ -17,7 +17,7 @@ LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::Windo
locktimer->setSingleShot(true);
hidetimer = new QTimer(this);
hidetimer->setSingleShot(true);
-
+
LOCKER = new LLockScreen(this);
LOCKER->hide();
settings = new QSettings("lumina-desktop","lumina-screensaver",this);
@@ -33,7 +33,7 @@ LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::Windo
}
LScreenSaver::~LScreenSaver(){
-
+
}
bool LScreenSaver::isLocked(){
@@ -66,7 +66,7 @@ void LScreenSaver::reloadSettings(){
hidetimer->setInterval( settings->value("hidesecs",15).toInt() * 1000 );
}
-void LScreenSaver::newInputEvent(){
+void LScreenSaver::newInputEvent(){
if(updating){ return; } //in the middle of making changes which could cause an event
if(DEBUG){ qDebug() << "New Input Event"; }
if(SSRunning && SSLocked){
@@ -79,7 +79,6 @@ void LScreenSaver::newInputEvent(){
HideScreenSaver();
}
UpdateTimers();
-
}
void LScreenSaver::LockScreenNow(){
@@ -119,7 +118,7 @@ void LScreenSaver::ShowScreenSaver(){
if(!this->isActiveWindow()){
this->raise();
this->show();
- this->activateWindow();
+ this->activateWindow();
}
for(int i=0; i<BASES.length(); i++){
BASES[i]->show();
@@ -149,10 +148,11 @@ void LScreenSaver::HideScreenSaver(){
if(!SSLocked){
this->hide();
emit ClosingScreenSaver();
+ emit LockStatusChanged(false);
}
- for(int i=0; i<BASES.length(); i++){
+ for(int i=0; i<BASES.length(); i++){
BASES[i]->hide();
- BASES[i]->stopPainting();
+ BASES[i]->stopPainting();
}
UpdateTimers();
}
@@ -171,6 +171,7 @@ void LScreenSaver::LockScreen(){
if(SSLocked){ return; }
if(DEBUG){ qDebug() << "Locking Screen:" << QDateTime::currentDateTime().toString(); }
SSLocked = true;
+ emit LockStatusChanged(true);
LOCKER->LoadSystemDetails();
UpdateTimers();
}
@@ -178,6 +179,7 @@ void LScreenSaver::LockScreen(){
void LScreenSaver::SSFinished(){
if(DEBUG){ qDebug() << "Screensaver Finished:" << QDateTime::currentDateTime().toString(); }
SSLocked = false;
+ emit LockStatusChanged(false);
HideLockScreen();
HideScreenSaver();
}
bgstack15