diff options
author | Ken Moore <moorekou@gmail.com> | 2020-04-24 19:46:53 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2020-04-24 19:46:53 -0400 |
commit | a12bd680f39a0503cb93413d3420fd80158835d9 (patch) | |
tree | 831243bb1c126498df9fcf520f26757c4bcc2ab1 /src-qt5/core/lumina-desktop/LSession.cpp | |
parent | More updates. (diff) | |
download | lumina-a12bd680f39a0503cb93413d3420fd80158835d9.tar.gz lumina-a12bd680f39a0503cb93413d3420fd80158835d9.tar.bz2 lumina-a12bd680f39a0503cb93413d3420fd80158835d9.zip |
Some more updates to the desktop.
Get the screensaver checks working
Diffstat (limited to 'src-qt5/core/lumina-desktop/LSession.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 0b82fdc2..f1d5973d 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -164,8 +164,8 @@ void LSession::setupSession(){ splash.showScreen("init"); qDebug() << "Initializing Session"; if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); } - QTime* timer = 0; - if(DEBUG){ timer = new QTime(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();} + QElapsedTimer* timer = 0; + if(DEBUG){ timer = new QElapsedTimer(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();} //Setup the QSettings default paths splash.showScreen("settings"); @@ -344,6 +344,8 @@ void LSession::NewCommunication(QStringList list){ screensChanged(); }else if(list[i]=="--show-start"){ emit StartButtonActivated(); + }else if(list[i]=="--lock"){ + QTimer::singleShot(10, ScreenSaver, SLOT(LockScreenNow()) ); }else if(list[i]=="--logout"){ QTimer::singleShot(1000, this, SLOT(StartLogout()));} } } @@ -400,6 +402,10 @@ void LSession::StartReboot(bool skipupdates){ QCoreApplication::exit(0); } +void LSession::LockScreen(){ + QTimer::singleShot(10, ScreenSaver, SLOT(LockScreenNow()) ); +} + void LSession::reloadIconTheme(){ //Wait a moment for things to settle before sending out the signal to the interfaces QApplication::processEvents(); |