aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LSession.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-21 09:17:34 -0400
committerKen Moore <ken@pcbsd.org>2015-05-21 09:17:34 -0400
commit1f07d073bb276dfaa7442036760621912b8d200c (patch)
tree1b434cd7253d3a9d351e2df9cea68d016462d214 /lumina-desktop/LSession.cpp
parentOops, forgot to include the process exit status comparison before changing th... (diff)
downloadlumina-1f07d073bb276dfaa7442036760621912b8d200c.tar.gz
lumina-1f07d073bb276dfaa7442036760621912b8d200c.tar.bz2
lumina-1f07d073bb276dfaa7442036760621912b8d200c.zip
Add a new boot splash screen to be used during the Lumina initialization phase. This is *not* a QSplashScreen, so we avoid the issues with VirtualBox/3D acceleration and it loads/updates much faster (almost no change in the startup time on my system).
Diffstat (limited to 'lumina-desktop/LSession.cpp')
-rw-r--r--lumina-desktop/LSession.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index e1eac520..b204b0a8 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -9,6 +9,7 @@
#include <QTime>
#include "LXcbEventFilter.h"
+#include "BootSplash.h"
//LibLumina X11 class
#include <LuminaX11.h>
@@ -75,6 +76,8 @@ LSession::~LSession(){
}
void LSession::setupSession(){
+ BootSplash splash;
+ splash.showScreen("init");
qDebug() << "Initializing Session";
if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); }
QTime* timer = 0;
@@ -82,10 +85,12 @@ void LSession::setupSession(){
//Seed random number generator (if needed)
qsrand( QTime::currentTime().msec() );
//Setup the QSettings default paths
+ splash.showScreen("settings");
if(DEBUG){ qDebug() << " - Init QSettings:" << timer->elapsed();}
QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
sessionsettings = new QSettings("LuminaDE", "sessionsettings");
//Setup the user's lumina settings directory as necessary
+ splash.showScreen("user");
if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();}
checkUserFiles(); //adds these files to the watcher as well
@@ -93,20 +98,24 @@ void LSession::setupSession(){
DESKTOPS.clear();
//Start the background system tray
+ splash.showScreen("systray");
if(DEBUG){ qDebug() << " - Init System Tray:" << timer->elapsed();}
startSystemTray();
//Launch Fluxbox
+ splash.showScreen("wm");
if(DEBUG){ qDebug() << " - Init WM:" << timer->elapsed();}
WM = new WMProcess();
WM->startWM();
//Initialize the desktops
+ splash.showScreen("desktop");
if(DEBUG){ qDebug() << " - Init Desktops:" << timer->elapsed();}
updateDesktops();
//Initialize the global menus
qDebug() << " - Initialize system menus";
+ splash.showScreen("menus");
if(DEBUG){ qDebug() << " - Init AppMenu:" << timer->elapsed();}
appmenu = new AppMenu();
if(DEBUG){ qDebug() << " - Init SettingsMenu:" << timer->elapsed();}
@@ -115,6 +124,7 @@ void LSession::setupSession(){
sysWindow = new SystemWindow();
//Now setup the system watcher for changes
+ splash.showScreen("final");
qDebug() << " - Initialize file system watcher";
if(DEBUG){ qDebug() << " - Init QFileSystemWatcher:" << timer->elapsed();}
watcher = new QFileSystemWatcher(this);
@@ -131,6 +141,7 @@ void LSession::setupSession(){
connect(this, SIGNAL(aboutToQuit()), this, SLOT(SessionEnding()) );
if(DEBUG){ qDebug() << " - Init Finished:" << timer->elapsed(); delete timer;}
QTimer::singleShot(3000, this, SLOT(launchStartupApps()) ); //startup these processes in 3 seconds
+ splash.close();
}
void LSession::CleanupSession(){
bgstack15