diff options
author | Ken Moore <moorekou@gmail.com> | 2020-04-24 17:53:28 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2020-04-24 17:55:02 -0400 |
commit | bf545b933bcb59a695702ecfcc7b1fa5f07fa557 (patch) | |
tree | 1030e63496788315e279b3c50f59ded8e370afb8 /src-qt5/core/lumina-desktop/LSession.cpp | |
parent | Disable xscreensaver from auto-start. (diff) | |
download | lumina-bf545b933bcb59a695702ecfcc7b1fa5f07fa557.tar.gz lumina-bf545b933bcb59a695702ecfcc7b1fa5f07fa557.tar.bz2 lumina-bf545b933bcb59a695702ecfcc7b1fa5f07fa557.zip |
Initial merge of the screensaver into the main lumina-desktop builds
Diffstat (limited to 'src-qt5/core/lumina-desktop/LSession.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 32bd409f..0b82fdc2 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -67,6 +67,7 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu currTranslator=0; mediaObj=0; sessionsettings=0; + ScreenSaver=0; //Setup the event filter for Qt5 evFilter = new XCBEventFilter(this); this->installNativeEventFilter( evFilter ); @@ -90,6 +91,7 @@ LSession::~LSession(){ //delete WM; settingsmenu->deleteLater(); appmenu->deleteLater(); + if(ScreenSaver!=0){ ScreenSaver->deleteLater(); } delete currTranslator; if(mediaObj!=0){delete mediaObj;} } @@ -238,6 +240,9 @@ void LSession::setupSession(){ connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherChange(QString)) ); connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) ); connect(this, SIGNAL(aboutToQuit()), this, SLOT(SessionEnding()) ); + if(DEBUG){ qDebug() << " - Start screensaver:" << timer->elapsed(); } + ScreenSaver = new LScreenSaver(); + ScreenSaver->start(); //if(DEBUG){ qDebug() << " - Process Events (4x):" << timer->elapsed();} //for(int i=0; i<4; i++){ LSession::processEvents(); } //Again, just a few event loops here so thing can settle before we close the splash screen if(DEBUG){ qDebug() << " - Launch Startup Apps:" << timer->elapsed();} @@ -719,6 +724,10 @@ QSettings* LSession::DesktopPluginSettings(){ return DPlugSettings; } +LScreenSaver* LSession::screenSaver(){ + return ScreenSaver; +} + WId LSession::activeWindow(){ //Check the last active window pointer first WId active = XCB->ActiveWindow(); |