aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-session/session.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-29 16:15:59 -0400
committerKen Moore <ken@pcbsd.org>2016-09-29 16:15:59 -0400
commit9bfe881f7b1d6134490c0c23959ed7625a478c97 (patch)
tree14873f4d8187c00bb8a779131fe30f2990cdc558 /src-qt5/core/lumina-session/session.cpp
parentA few changes to the desktop: (diff)
downloadlumina-9bfe881f7b1d6134490c0c23959ed7625a478c97.tar.gz
lumina-9bfe881f7b1d6134490c0c23959ed7625a478c97.tar.bz2
lumina-9bfe881f7b1d6134490c0c23959ed7625a478c97.zip
Add a session option to disable compositing if no GPU acceleration is detected
sessionsettings.conf: "compositingWithGpuAccelOnly":<bool> (false by default)
Diffstat (limited to 'src-qt5/core/lumina-session/session.cpp')
-rw-r--r--src-qt5/core/lumina-session/session.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index 0e88a227..5b0d7980 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -107,6 +107,7 @@ void LSession::start(){
startProcess("compositing","compton");
}else{
//Auto-detect if GLX is available on the system and turn it on/off as needed
+ bool startcompton = true;
if(LUtils::isValidBinary("glxinfo")){
bool hasAccel =! LUtils::getCmdOutput("glxinfo -B").filter("direct rendering:").filter("Yes").isEmpty();
qDebug() << "Detected GPU Acceleration:" << hasAccel;
@@ -115,10 +116,11 @@ void LSession::start(){
if(info[i].section("=",0,0).simplified()=="backend"){ info[i] = QString("backend = \"")+ (hasAccel ? "glx" : "xrender")+"\""; break; } //replace this line
}
LUtils::writeFile(set, info, true);
+ if( !hasAccel && settings.value("compositingWithGpuAccelOnly",false).toBool() ){ startcompton = false; }
}
- startProcess("compositing","compton --config \""+set+"\"", QStringList() << set);
+ if(startcompton){ startProcess("compositing","compton --config \""+set+"\"", QStringList() << set); }
}
- }else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); }
+ }else if(LUtils::isValidBinary("xcompmgr") && !settings.value("compositingWithGpuAccelOnly",false).toBool() ){ startProcess("compositing","xcompmgr"); }
}
//Desktop Next
startProcess("runtime","lumina-desktop");
bgstack15