aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2017-08-15 13:17:49 -0400
committerZackaryWelch <welch.zackary@gmail.com>2017-08-15 13:17:49 -0400
commitd86928a566cf317d52b2248b72c5bc5af3e90225 (patch)
tree0fc7ae7ba3144fb1874b77d82bc0b6d2118c3e73 /src-qt5
parentResynced translation files and fixed translations of the boot splash UI (diff)
parentMake the wm crash-reset timer 2 seconds between crashes. (diff)
downloadlumina-d86928a566cf317d52b2248b72c5bc5af3e90225.tar.gz
lumina-d86928a566cf317d52b2248b72c5bc5af3e90225.tar.bz2
lumina-d86928a566cf317d52b2248b72c5bc5af3e90225.zip
Merge branch 'master' of https://github.com/trueos/lumina
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-session/session.cpp2
-rw-r--r--src-qt5/core/lumina-session/session.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index fb9c6cd1..3fdf9e66 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -39,7 +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<3){ wmfails++; PROCS[i]->start(QIODevice::ReadOnly); } //restart the WM
+ 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;
diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h
index 36d67782..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>
@@ -60,6 +61,7 @@ private:
QList<QProcess*> PROCS;
bool stopping;
int wmfails;
+ QTimer *wmTimer;
private slots:
void stopall();
@@ -68,9 +70,14 @@ private slots:
void startProcess(QString ID, QString command, QStringList watchfiles = QStringList());
+ void resetWMCounter(){ wmfails = 0; }
public:
LSession(){
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(){ }
bgstack15