diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktop.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktop.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index b08251bd..5031fb96 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -96,7 +96,11 @@ void LDesktop::UpdateGeometry(){ //qDebug() << " - Done With Desktop Geom Updates"; QTimer::singleShot(0, this, SLOT(UpdatePanels())); } - + +void LDesktop::SystemLock(){ + QProcess::startDetached("xscreensaver-command -lock"); +} + void LDesktop::SystemLogout(){ LSession::handle()->systemWindow(); } @@ -279,6 +283,7 @@ void LDesktop::UpdateMenu(bool fast){ usewinmenu=false; for(int i=0; i<items.length(); i++){ if(items[i]=="terminal"){ deskMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(SystemTerminal()) ); } + else if(items[i]=="lockdesktop"){ deskMenu->addAction(LXDG::findIcon("system-lock-screen",""), tr("Lock Session"), this, SLOT(SystemLock()) ); } else if(items[i]=="filemanager"){ deskMenu->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"), this, SLOT(SystemFileManager()) ); } else if(items[i]=="applications"){ deskMenu->addMenu( LSession::handle()->applicationMenu() ); } else if(items[i]=="line"){ deskMenu->addSeparator(); } |