diff options
author | Weblate <noreply@weblate.org> | 2017-08-17 16:11:36 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-08-17 16:11:36 +0000 |
commit | 35915a6a5a72ea5c45af7a787dcad69fee31218b (patch) | |
tree | 250dc618a5f8e12f041a1a2166269e3c8c3c4bfa /src-qt5/core/lumina-session | |
parent | Translated using Weblate (French) (diff) | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | lumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.tar.gz lumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.tar.bz2 lumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-session')
-rw-r--r-- | src-qt5/core/lumina-session/session.cpp | 3 | ||||
-rw-r--r-- | src-qt5/core/lumina-session/session.h | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index f9c8060a..3fdf9e66 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -39,6 +39,7 @@ void LSession::procFinished(){ if(!stopping){ //See if this process is the main desktop binary if(PROCS[i]->objectName()=="runtime"){ stopall(); } + else if(PROCS[i]->objectName()=="wm" && wmfails<2){ wmfails++; PROCS[i]->start(QIODevice::ReadOnly); wmTimer->start(); } //restart the WM //if(PROCS[i]->program().section("/",-1) == "lumina-desktop"){ stopall(); } //start closing down everything //else{ PROCS[i]->start(QIODevice::ReadOnly); } //restart the process //break; @@ -95,7 +96,7 @@ void LSession::start(bool unified){ QSettings sessionsettings("lumina-desktop","sessionsettings"); QString WM = sessionsettings.value("WindowManager", "fluxbox").toString(); //Window Manager First - if(WM=="fluxbox" || WM.endsWith("/fluxbox") || WM.isEmpty() ){ + if(WM=="fluxbox" || WM.endsWith("/fluxbox") || WM.simplified().isEmpty() ){ // FLUXBOX BUG BYPASS: if the ~/.fluxbox dir does not exist, it will ignore the given config file if( !LUtils::isValidBinary("fluxbox") ){ qDebug() << "[INCOMPLETE LUMINA INSTALLATION] fluxbox binary is missing - cannot continue"; diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index caa61ad6..5cf1ccfa 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -8,6 +8,7 @@ #include <QProcess> #include <QDebug> #include <QFileSystemWatcher> +#include <QTimer> #include <sys/types.h> #include <signal.h> @@ -59,6 +60,8 @@ class LSession : public QObject{ private: QList<QProcess*> PROCS; bool stopping; + int wmfails; + QTimer *wmTimer; private slots: void stopall(); @@ -67,9 +70,14 @@ private slots: void startProcess(QString ID, QString command, QStringList watchfiles = QStringList()); + void resetWMCounter(){ wmfails = 0; } public: LSession(){ - stopping = false; + stopping = false; wmfails = 0; + wmTimer = new QTimer(this); + wmTimer->setSingleShot(true); + wmTimer->setInterval(2000); //2 second timeout + connect(wmTimer, SIGNAL(timeout()), this, SLOT(resetWMCounter()) ); } ~LSession(){ } |