From 99fa7c8ab6198db465feca916dd9ea92e602f973 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 14 Aug 2017 11:54:05 -0400 Subject: Add a wm failure counter to start-lumina-desktop, and restart the process up to 3 times maximum. --- src-qt5/core/lumina-session/session.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-session/session.h') diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index caa61ad6..36d67782 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -59,6 +59,7 @@ class LSession : public QObject{ private: QList PROCS; bool stopping; + int wmfails; private slots: void stopall(); @@ -69,7 +70,7 @@ private slots: public: LSession(){ - stopping = false; + stopping = false; wmfails = 0; } ~LSession(){ } -- cgit From 85ad3904f27ddfc131d5d30b3aea230cbbaa9fbc Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Aug 2017 11:43:57 -0400 Subject: Setup the WM restart routine to make it more flexible: 1) The WM will be restarted a maximum of twice with crashes less than 5 seconds apart. 2) This makes it more flexible with regards to opeartions which require that fluxbox be restarted (such as changing the screen around). --- src-qt5/core/lumina-session/session.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src-qt5/core/lumina-session/session.h') diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index 36d67782..bee244ee 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,7 @@ private: QList 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(5000); //5 second timeout + connect(wmTimer, SIGNAL(timeout()), this, SLOT(resetWMCounter()) ); } ~LSession(){ } -- cgit From b914f028fe1156ce737b1986b4d2136208aa2b30 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Aug 2017 11:47:29 -0400 Subject: Make the wm crash-reset timer 2 seconds between crashes. --- src-qt5/core/lumina-session/session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core/lumina-session/session.h') diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index bee244ee..5cf1ccfa 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -76,7 +76,7 @@ public: stopping = false; wmfails = 0; wmTimer = new QTimer(this); wmTimer->setSingleShot(true); - wmTimer->setInterval(5000); //5 second timeout + wmTimer->setInterval(2000); //2 second timeout connect(wmTimer, SIGNAL(timeout()), this, SLOT(resetWMCounter()) ); } ~LSession(){ } -- cgit