From 8417684b84a2ff4bb07c28c89274c045fd4104f8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 3 Nov 2015 13:32:35 -0500 Subject: 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. --- lumina-wm-INCOMPLETE/LScreenSaver.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lumina-wm-INCOMPLETE/LScreenSaver.cpp') 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 #include +#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) } -- cgit