Browse files

Put a 2 second delay of showing the PCDM splash screen after a DE clo…

…ses. This should give some time for devices to settle so we can catch when the system is going into shutdown a bit more reliably.
  • Loading branch information...
1 parent 88745de commit 81db2a424bdf8ff24df2eead9e609b7fd8f80e2c Ken Moore committed Nov 13, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 src-qt4/PCDM/src/main.cpp
@@ -145,13 +145,17 @@ int runSingleSession(int argc, char *argv[]){
//}; //show the splash screen again
- QCoreApplication::processEvents();
+ //Now wait a couple seconds for things to settle
+ QTime wTime = QTime::currentTime().addSecs(2);
+ while( QTime::currentTime() < wTime ){
+ QCoreApplication::processEvents(QEventLoop::AllEvents,100);
+ }
//check for shutdown process
splash.showMessage(QObject::tr("System Shutting Down"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);
//Pause for a few seconds to prevent starting a new session during a shutdown
- QTime wTime = QTime::currentTime().addSecs(30);
+ wTime = QTime::currentTime().addSecs(30);
while( QTime::currentTime() < wTime ){
//Keep processing events during the wait (for splashscreen)
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);

0 comments on commit 81db2a4

Please sign in to comment.