aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/LSession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop/LSession.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp10
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();
bgstack15