diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-22 04:55:42 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-22 04:55:42 -0400 |
commit | 60b24de5be126f387e5bd4ea654c36e7f0bdd0d4 (patch) | |
tree | 9e9bd4b7865f46b0deae7619be296c8994fb8660 /src-qt5/core/lumina-session/session.cpp | |
parent | Oops - forgot to add the new test.xml file to the last commit. (diff) | |
parent | Start a large update to LuminaRandR info retrieval routine. (diff) | |
download | lumina-60b24de5be126f387e5bd4ea654c36e7f0bdd0d4.tar.gz lumina-60b24de5be126f387e5bd4ea654c36e7f0bdd0d4.tar.bz2 lumina-60b24de5be126f387e5bd4ea654c36e7f0bdd0d4.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-session/session.cpp')
-rw-r--r-- | src-qt5/core/lumina-session/session.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index 833a6152..1aa86720 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -31,19 +31,22 @@ void LSession::stopall(){ void LSession::procFinished(){ //Go through and check the status on all the procs to determine which one finished int stopped = 0; + //qDebug() << "Got Process Stopped Signal:"; for(int i=0; i<PROCS.length(); i++){ if(PROCS[i]->state()==QProcess::NotRunning){ + //qDebug() << " - Stopped:" << PROCS[i]->objectName(); stopped++; if(!stopping){ //See if this process is the main desktop binary if(PROCS[i]->objectName()=="runtime"){ stopall(); } //if(PROCS[i]->program().section("/",-1) == "lumina-desktop"){ stopall(); } //start closing down everything //else{ PROCS[i]->start(QIODevice::ReadOnly); } //restart the process - break; + //break; } } } - if(stopping && stopped==PROCS.length()){ + //qDebug() << " - Final Count:" << stopped << stopping; + if(stopping || stopped==PROCS.length()){ QCoreApplication::exit(0); } } @@ -65,7 +68,7 @@ void LSession::startProcess(QString ID, QString command, QStringList watchfiles) if(!QFile::exists("/etc/machine-id") && !QFile::exists("/var/db/dbus/machine-id")){ if(LUtils::isValidBinary("dbus-uuidgen") && LUtils::runCmd("dbus-uuidgen --ensure") ){ } //good - the UUID was created successfully else if(LUtils::isValidBinary("dbus-launch")){ command.prepend("dbus-launch --exit-with-session "); } - else{ + else{ //create a simple DBUS UUID and put it in the universal-fallback location (OS-independent) // TO-DO - root vs user level permissions issue? qDebug() << "Could not find '/etc/machine-id' or '/var/db/dbus/machine-id': Qt will most likely crash. \nPlease run 'dbus-uuidgen --ensure' with root permissions to generate this file if Lumina does not start properly."; @@ -98,13 +101,13 @@ void LSession::start(bool unified){ keys = keys.replaceInStrings("${XDG_CONFIG_HOME}", QString( getenv("XDG_CONFIG_HOME"))); LUtils::writeFile(confDir+"/fluxbox-init", keys, true); QFile::setPermissions(confDir+"/fluxbox-init", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup); - } + } if(!QFile::exists(confDir+"/fluxbox-keys")){ QStringList keys = LUtils::readFile(LOS::LuminaShare()+"/fluxbox-keys"); keys = keys.replaceInStrings("${XDG_CONFIG_HOME}", QString( getenv("XDG_CONFIG_HOME"))); LUtils::writeFile(confDir+"/fluxbox-keys", keys, true); QFile::setPermissions(confDir+"/fluxbox-keys", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup); - } + } // FLUXBOX BUG BYPASS: if the ~/.fluxbox dir does not exist, it will ignore the given config file if(!QFile::exists(QDir::homePath()+"/.fluxbox")){ QDir dir; dir.mkpath(QDir::homePath()+"/.fluxbox"); @@ -129,7 +132,7 @@ void LSession::start(bool unified){ bool hasAccel =! LUtils::getCmdOutput("glxinfo -B").filter("direct rendering:").filter("Yes").isEmpty(); qDebug() << "Detected GPU Acceleration:" << hasAccel; QStringList info = LUtils::readFile(set); - for(int i=0; i<info.length(); i++){ + for(int i=0; i<info.length(); i++){ if(info[i].section("=",0,0).simplified()=="backend"){ info[i] = QString("backend = \"")+ (hasAccel ? "glx" : "xrender")+"\""; break; } //replace this line } LUtils::writeFile(set, info, true); @@ -142,7 +145,7 @@ void LSession::start(bool unified){ } else { if(!LUtils::isValidBinary(WM)){ exit(1); - } + } startProcess("wm", WM); } //Desktop Next |