aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-14 10:47:29 -0400
committerKen Moore <ken@pcbsd.org>2015-05-14 10:47:29 -0400
commit19f9f1b04fc218f2a2d15e0e3015bae308a26197 (patch)
tree14a11126fe565fbd663d8514caa4afd5cd69e7e8
parentMerge pull request #121 from Nanolx/master (diff)
downloadlumina-19f9f1b04fc218f2a2d15e0e3015bae308a26197.tar.gz
lumina-19f9f1b04fc218f2a2d15e0e3015bae308a26197.tar.bz2
lumina-19f9f1b04fc218f2a2d15e0e3015bae308a26197.zip
A couple adjustments to the session startup procedures:
1) Ensure that numlockx is actually installed before running that check/enable routine. 2) Add a 250ms delay (non-blocking) between auto-started applications. This just helps prevent overloading the system and is a bit nicer about starting a lot of processes in a short time frame.
-rw-r--r--lumina-desktop/LSession.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index be144c04..e1eac520 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -213,10 +213,13 @@ void LSession::launchStartupApps(){
//First start any system-defined startups, then do user defined
qDebug() << "Launching startup applications";
- //Enable Numlock
- if(sessionsettings->value("EnableNumlock",false).toBool()){
- QProcess::startDetached("numlockx on");
+ //Enable Numlock
+ if(LUtils::isValidBinary("numlockx")){ //make sure numlockx is installed
+ if(sessionsettings->value("EnableNumlock",false).toBool()){
+ QProcess::startDetached("numlockx on");
+ }
}
+
//First create the list of all possible locations in order of precedence
// NOTE: Lumina/system defaults should be launched earlier due to possible system admin utilities
/*QStringList filelist;
@@ -257,7 +260,12 @@ void LSession::launchStartupApps(){
//Don't update the mouse cursor
QProcess::startDetached("lumina-open \""+xdgapps[i].filePath+"\"");
}
- LSession::processEvents();
+ //Put a tiny bit of space between app starts (don't overload the system)
+ for(int i=0; i<5; i++){
+ usleep(50000); //50ms = 50000 us --> 250ms total wait
+ LSession::processEvents();
+ }
+
}
//Re-load the screen brightness and volume settings from the previous session
bgstack15