aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-session
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2020-07-02 09:21:17 -0400
committerKen Moore <moorekou@gmail.com>2020-07-02 09:21:17 -0400
commit3dbfc711785df2e9cb43a2a8e593638abaceb64d (patch)
tree2a2199c958403e591a11e731790a7f8c230f0cd8 /src-qt5/core/lumina-session
parentEnsure the older screensaver system in X11 is also disabled when DPMS is disa... (diff)
downloadlumina-3dbfc711785df2e9cb43a2a8e593638abaceb64d.tar.gz
lumina-3dbfc711785df2e9cb43a2a8e593638abaceb64d.tar.bz2
lumina-3dbfc711785df2e9cb43a2a8e593638abaceb64d.zip
Cleanup some more of the lumina startup routines - specifically around the compositor startupHEADmaster
Diffstat (limited to 'src-qt5/core/lumina-session')
-rw-r--r--src-qt5/core/lumina-session/session.cpp8
-rw-r--r--src-qt5/core/lumina-session/session.h16
2 files changed, 18 insertions, 6 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index cba855c9..b344b1d8 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -88,7 +88,13 @@ void LSession::procFinished(){
//if(PROCS[i]->exitCode()==787){ PROCS[i]->start(QIODevice::ReadOnly); } //special internal restart code
//else{
stopall(); //}
- }else if(PROCS[i]->objectName()=="wm" && wmfails<2){ wmfails++; PROCS[i]->start(QIODevice::ReadOnly); wmTimer->start(); } //restart the WM
+ }else if(PROCS[i]->objectName()=="wm" && wmfails<2){
+ wmfails++;
+ PROCS[i]->start(QIODevice::ReadOnly); wmTimer->start(); //restart the WM
+ }else if(PROCS[i]->objectName()=="compositing" && compfails<2){
+ compfails++;
+ PROCS[i]->start(QIODevice::ReadOnly); compTimer->start(); //restart the compositor
+ }
//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 0c7ff97c..5e8835e1 100644
--- a/src-qt5/core/lumina-session/session.h
+++ b/src-qt5/core/lumina-session/session.h
@@ -25,10 +25,11 @@ private slots:
//qDebug() << " - Program:" << this->program();
if(watcher==0){ return; } //just in case
if(this->state()==QProcess::Running){
- if(this->program().section(" ",0,0).section("/",-1) == "fluxbox" ){
+ QString prog = this->program().section(" ",0,0).section("/",-1);
+ if( prog == "fluxbox" ){
// qDebug() << "Sending Fluxbox signal to reload configs...";
::kill(this->pid(), SIGUSR2); } //Fluxbox needs SIGUSR2 to reload it's configs
- else if(this->program().section(" ",0,0).section("/",-1) == "compton" ){
+ else if(prog == "compton" || prog == "picom" ){
//qDebug() << "Sending Compton signal to reload configs...";
::kill(this->pid(), SIGUSR1); } //Compton needs SIGUSR1 to reload it's configs
}
@@ -61,8 +62,8 @@ class LSession : public QObject{
private:
QList<QProcess*> PROCS;
bool stopping;
- int wmfails;
- QTimer *wmTimer;
+ int wmfails, compfails;
+ QTimer *wmTimer, *compTimer;
bool setupFluxboxFiles();
bool setupComptonFiles();
@@ -76,13 +77,18 @@ private slots:
void startProcess(QString ID, QString command, QStringList watchfiles = QStringList());
void resetWMCounter(){ wmfails = 0; }
+ void resetCompCounter(){ compfails = 0; }
public:
LSession(){
- stopping = false; wmfails = 0;
+ stopping = false; wmfails = compfails = 0 ;
wmTimer = new QTimer(this);
wmTimer->setSingleShot(true);
wmTimer->setInterval(2000); //2 second timeout
connect(wmTimer, SIGNAL(timeout()), this, SLOT(resetWMCounter()) );
+ compTimer = new QTimer(this);
+ compTimer->setSingleShot(true);
+ compTimer->setInterval(2000); //2 second timeout
+ connect(compTimer, SIGNAL(timeout()), this, SLOT(resetCompCounter()) );
}
~LSession(){ }
bgstack15