aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-04-20 13:20:52 -0400
committerKen Moore <ken@pcbsd.org>2015-04-20 13:20:52 -0400
commit3195432db816416fab7a895dcd442e898290c0dc (patch)
tree5c44a19c626b29a44de9ef2e027689fc39be705f /lumina-desktop
parentUpdate th elibLumina.pro: (diff)
downloadlumina-3195432db816416fab7a895dcd442e898290c0dc.tar.gz
lumina-3195432db816416fab7a895dcd442e898290c0dc.tar.bz2
lumina-3195432db816416fab7a895dcd442e898290c0dc.zip
Add a special flag to prevent the lumina-open crash handler from starting up during the session cleanup procedures.
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LSession.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index e076210f..0fea2fa1 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -75,6 +75,7 @@ LSession::~LSession(){
void LSession::setupSession(){
qDebug() << "Initializing Session";
+ if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); }
QTime* timer = 0;
if(DEBUG){ timer = new QTime(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();}
//Seed random number generator (if needed)
@@ -134,6 +135,8 @@ void LSession::CleanupSession(){
LSession::processEvents();
QDateTime time = QDateTime::currentDateTime();
qDebug() << "Start closing down the session: " << time.toString( Qt::SystemLocaleShortDate);
+ //Create a temporary flag to prevent crash dialogs from opening during cleanup
+ LUtils::writeFile("/tmp/.luminastopping",QStringList() << "yes", true);
//Start the logout chimes (if necessary)
bool playaudio = sessionsettings->value("PlayLogoutAudio",true).toBool();
if( playaudio ){ playAudioFile(LOS::LuminaShare()+"Logout.ogg"); }
@@ -184,6 +187,8 @@ void LSession::CleanupSession(){
}else{
for(int i=0; i<20; i++){ LSession::processEvents(); usleep(25000); } //1/2 second pause
}
+ //Clean up the temporary flag
+ if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); }
//if(audioThread!=0){ audioThread->exit(0); }
}
bgstack15