diff options
author | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-06 19:27:57 +0200 |
---|---|---|
committer | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-06 19:27:57 +0200 |
commit | b4803118c5e22e7a00d313698868a0ebbe5188ba (patch) | |
tree | b5e1ca893e40ed571cbea5abf055ec2018dc4a83 /lumina-desktop | |
parent | Clean up the new global.h usage in all the Lumina subprojects. (diff) | |
download | lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.tar.gz lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.tar.bz2 lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.zip |
make window manager selectable from lumina-config>settings>general
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/WMProcess.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lumina-desktop/WMProcess.cpp b/lumina-desktop/WMProcess.cpp index aecd4bac..eb88c8e6 100644 --- a/lumina-desktop/WMProcess.cpp +++ b/lumina-desktop/WMProcess.cpp @@ -5,6 +5,7 @@ // See the LICENSE file for full details //=========================================== #include "WMProcess.h" +#include "LSession.h" WMProcess::WMProcess() : QProcess(){ connect(this,SIGNAL(finished(int, QProcess::ExitStatus)),this,SLOT(processFinished(int, QProcess::ExitStatus)) ); @@ -17,7 +18,7 @@ WMProcess::WMProcess() : QProcess(){ } WMProcess::~WMProcess(){ - + } // ======================= @@ -55,7 +56,7 @@ bool WMProcess::isRunning(){ } QString WMProcess::setupWM(){ - QString WM = "fluxbox"; + QString WM = LSession::sessionSettings()->value("WindowManager", "fluxbox").toString(); QString cmd="echo WM Disabled"; //leave the option to add other window managers here (for testing purposes) if(WM=="openbox"){ @@ -85,6 +86,8 @@ QString WMProcess::setupWM(){ QFile::setPermissions(confDir+"/lumina-menu.xml", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup); }*/ cmd = "fluxbox -rc "+confDir+"/fluxbox-init"; + }else { + cmd = WM; } return cmd; } @@ -103,13 +106,13 @@ void WMProcess::processFinished(int exitcode, QProcess::ExitStatus status){ if(!inShutdown){ if(exitcode == 0 && status == QProcess::NormalExit){ cleanupConfig(); - emit WMShutdown(); + emit WMShutdown(); }else{ //restart the Window manager this->startWM(); } }else{ - cleanupConfig(); + cleanupConfig(); } } - + |