diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-23 12:16:27 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-23 12:16:27 -0400 |
commit | 2e1dcf74f71388594592b503cdb91237e08a607f (patch) | |
tree | c55cf5de2b296c1e0a6fc16f425c761993207060 /lumina-desktop | |
parent | A couple updates for lumina-open: (diff) | |
download | lumina-2e1dcf74f71388594592b503cdb91237e08a607f.tar.gz lumina-2e1dcf74f71388594592b503cdb91237e08a607f.tar.bz2 lumina-2e1dcf74f71388594592b503cdb91237e08a607f.zip |
Re-arrange the startup procedures a bit:
*Run the audio/brightness setting routines *after* doing the XDG autostart stuff. This catches situations where the audio system (such as pulseaudio) is getting started by the XDG autostart routines.
*Run the login chimes at the end of the startup procedures, instead of right before the autostart functionality. This ensures that the audio volume was already reset to the previous value before playing the music.
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LSession.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 8b05b5ef..6d0079f0 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -111,15 +111,6 @@ void LSession::setupSession(){ appmenu = new AppMenu(); if(DEBUG){ qDebug() << " - Init SettingsMenu:" << timer->elapsed();} settingsmenu = new SettingsMenu(); - - //Re-load the screen brightness and volume settings from the previous session - qDebug() << " - Loading previous settings"; - int tmp = LOS::audioVolume(); - LOS::setAudioVolume(tmp); - qDebug() << " - - Audio Volume:" << QString::number(tmp)+"%"; - tmp = LOS::ScreenBrightness(); - LOS::setScreenBrightness( tmp ); - qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; //Now setup the system watcher for changes qDebug() << " - Initialize file system watcher"; @@ -218,13 +209,7 @@ int LSession::VersionStringToNumber(QString version){ void LSession::launchStartupApps(){ //First start any system-defined startups, then do user defined qDebug() << "Launching startup applications"; - //Now play the login music - if(sessionsettings->value("PlayStartupAudio",true).toBool()){ - //Make sure to re-set the system volume to the last-used value at outset - int vol = LOS::audioVolume(); - if(vol>=0){ LOS::setAudioVolume(vol); } - LSession::playAudioFile(LOS::LuminaShare()+"Login.ogg"); - } + //Enable Numlock if(sessionsettings->value("EnableNumlock",false).toBool()){ QProcess::startDetached("numlockx on"); @@ -272,6 +257,23 @@ void LSession::launchStartupApps(){ LSession::processEvents(); } + //Re-load the screen brightness and volume settings from the previous session + // Wait until after the XDG-autostart functions, since the audio system might be started that way + qDebug() << " - Loading previous settings"; + int tmp = LOS::audioVolume(); + LOS::setAudioVolume(tmp); + qDebug() << " - - Audio Volume:" << QString::number(tmp)+"%"; + tmp = LOS::ScreenBrightness(); + LOS::setScreenBrightness( tmp ); + qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; + + //Now play the login music since we are finished + if(sessionsettings->value("PlayStartupAudio",true).toBool()){ + //Make sure to re-set the system volume to the last-used value at outset + int vol = LOS::audioVolume(); + if(vol>=0){ LOS::setAudioVolume(vol); } + LSession::playAudioFile(LOS::LuminaShare()+"Login.ogg"); + } } void LSession::StartLogout(){ |