diff options
author | Ken Moore <moorekou@gmail.com> | 2015-11-03 13:32:35 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-11-03 13:32:35 -0500 |
commit | 8417684b84a2ff4bb07c28c89274c045fd4104f8 (patch) | |
tree | 754ade19c856f79c00e3fdf3d9c220d62aa87e97 /lumina-wm-INCOMPLETE/LScreenSaver.cpp | |
parent | Add all the animations framework for the screensaver side of lumina-wm (with ... (diff) | |
download | lumina-8417684b84a2ff4bb07c28c89274c045fd4104f8.tar.gz lumina-8417684b84a2ff4bb07c28c89274c045fd4104f8.tar.bz2 lumina-8417684b84a2ff4bb07c28c89274c045fd4104f8.zip |
Clean up the Screensaver framework a bit more, add a test flag (--test-ss), and fix up the starting of screensavers on all screens simultaneously.
This solidifies the Screensaver plugin framework as completely functional - just need to finish up the lock/unlock screen now.
Diffstat (limited to 'lumina-wm-INCOMPLETE/LScreenSaver.cpp')
-rw-r--r-- | lumina-wm-INCOMPLETE/LScreenSaver.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lumina-wm-INCOMPLETE/LScreenSaver.cpp b/lumina-wm-INCOMPLETE/LScreenSaver.cpp index 3b1d5e6a..62221abb 100644 --- a/lumina-wm-INCOMPLETE/LScreenSaver.cpp +++ b/lumina-wm-INCOMPLETE/LScreenSaver.cpp @@ -8,6 +8,8 @@ #include <QScreen> #include <QApplication> +#define DEBUG 1 + LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::WindowStaysOnTopHint){ starttimer = new QTimer(this); starttimer->setSingleShot(true); @@ -36,7 +38,7 @@ bool LScreenSaver::isLocked(){ // =========== void LScreenSaver::start(){ reloadSettings(); //setup all the initial time frames - + starttimer->start(1000);// one second delay (for testing) } void LScreenSaver::reloadSettings(){ @@ -81,6 +83,7 @@ void LScreenSaver::newInputEvent(){ // PRIVATE SLOTS // =========== void LScreenSaver::ShowScreenSaver(){ + if(DEBUG){ qDebug() << "Showing Screen Saver:" << QDateTime::currentDateTime().toString(); } SSRunning = true; //Start the lock timer if necessary if(!SSLocked && (settings->value("lockdelaymin",10).toInt()>0) ){ locktimer->start(); } @@ -114,12 +117,14 @@ void LScreenSaver::ShowScreenSaver(){ } void LScreenSaver::ShowLockScreen(){ - SSLocked = true; + if(DEBUG){ qDebug() << "Locking Screen Saver:" << QDateTime::currentDateTime().toString(); } + //SSLocked = true; //Start the timer for hiding the lock screen due to inactivity if(settings->value("hidesecs",15).toInt() > 0 ){ hidetimer->start(); } } void LScreenSaver::HideScreenSaver(){ + if(DEBUG){ qDebug() << "Hiding Screen Saver:" << QDateTime::currentDateTime().toString(); } SSRunning = false; if(!SSLocked){ this->hide(); @@ -129,5 +134,6 @@ void LScreenSaver::HideScreenSaver(){ } void LScreenSaver::HideLockScreen(){ + if(DEBUG){ qDebug() << "Hiding Lock Screen:" << QDateTime::currentDateTime().toString(); } //Leave the Locked flag set (still locked, just not visible) } |