diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified')
5 files changed, 21 insertions, 13 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 82fb4a4b..63e86fdc 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -12,15 +12,17 @@ #define DEBUG 0 #endif +//Initialize all the global objects to null pointers +EventFilter* Lumina::EFILTER = 0; +LScreenSaver* Lumina::SS = 0; +DesktopSettings* Lumina::SETTINGS = 0; +//Lumina::WM = 0; +QThread* Lumina::EVThread = 0; +RootWindow* Lumina::ROOTWIN = 0; + LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lumina-desktop"){ //Initialize the global objects to null pointers mediaObj = 0; //private object used for playing login/logout chimes - Lumina::EFILTER = 0; - Lumina::SS = 0; - Lumina::SETTINGS = 0; - //Lumina::WM = 0; - Lumina::EVThread = 0; - if(this->isPrimaryProcess()){ //Setup the global registrations this->setApplicationName("Lumina Desktop Environment"); @@ -43,6 +45,8 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu Lumina::EVThread = new QThread(); Lumina::EFILTER->moveToThread(Lumina::EVThread); Lumina::EVThread->start(); + Lumina::ROOTWIN = new RootWindow(); + } //end check for primary process } @@ -56,6 +60,7 @@ LSession::~LSession(){ Lumina::EVThread->deleteLater(); } if(Lumina::SETTINGS!=0){ Lumina::SETTINGS->deleteLater(); } + if(Lumina::ROOTWIN!=0){ Lumina::ROOTWIN->deleteLater(); } } void LSession::setupSession(){ @@ -235,7 +240,7 @@ void LSession::launchStartupApps(){ //Enable Numlock if(LUtils::isValidBinary("numlockx")){ //make sure numlockx is installed - if(sessionsettings->value("EnableNumlock",false).toBool()){ + if(Lumina::SETTINGS->value(DesktopSettings::System,"EnableNumlock",false).toBool()){ QProcess::startDetached("numlockx on"); }else{ QProcess::startDetached("numlockx off"); @@ -256,7 +261,7 @@ void LSession::launchStartupApps(){ qDebug() << " - - Audio Volume:" << QString::number(tmp)+"%"; //Now play the login music since we are finished - if(sessionsettings->value("PlayStartupAudio",true).toBool()){ + if(Lumina::SETTINGS->value(DesktopSettings::System,"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); } @@ -268,11 +273,11 @@ void LSession::launchStartupApps(){ void LSession::checkUserFiles(){ //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] - QString OVS = sessionsettings->value("DesktopVersion","0").toString(); //Old Version String + QString OVS = Lumina::SETTINGS->value(DesktopSettings::System,"DesktopVersion","0").toString(); //Old Version String bool changed = LDesktopUtils::checkUserFiles(OVS); if(changed){ //Save the current version of the session to the settings file (for next time) - sessionsettings->setValue("DesktopVersion", this->applicationVersion()); + Lumina::SETTINGS->setValue(DesktopSettings::System,"DesktopVersion", this->applicationVersion()); } } diff --git a/src-qt5/core/lumina-desktop-unified/LSession.h b/src-qt5/core/lumina-desktop-unified/LSession.h index d9c652c6..ac156035 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.h +++ b/src-qt5/core/lumina-desktop-unified/LSession.h @@ -22,7 +22,7 @@ private: void CleanupSession(); int VersionStringToNumber(QString version); - QMediaObject *mediaObj; + QMediaPlayer *mediaObj; void playAudioFile(QString filepath); QTranslator *currTranslator; diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index c7433155..04c4c27c 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -55,6 +55,7 @@ #include <LDesktopUtils.h> #include <LuminaSingleApplication.h> #include <DesktopSettings.h> +#include <RootWindow.h> // Standard C includes #include <unistd.h> diff --git a/src-qt5/core/lumina-desktop-unified/global-objects.h b/src-qt5/core/lumina-desktop-unified/global-objects.h index 579807c7..7d924378 100644 --- a/src-qt5/core/lumina-desktop-unified/global-objects.h +++ b/src-qt5/core/lumina-desktop-unified/global-objects.h @@ -35,11 +35,12 @@ namespace Lumina{ extern DesktopSettings *SETTINGS; //All Settings files //ScreenSaver extern LScreenSaver *SS; + //Root Window + extern RootWindow *ROOTWIN; //Window Manager //LWindowManager *WM; - QThread *EVThread; //X Event thread + extern QThread *EVThread; //X Event thread }; - #endif diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index 3f228373..a583e9d7 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -16,6 +16,7 @@ include(../libLumina/LuminaX11.pri) include(../libLumina/LuminaSingleApplication.pri) include(../libLumina/LuminaThemes.pri) include(../libLumina/DesktopSettings.pri) +include(../libLumina/RootWindow.pri) #include all the main individual source groups include(src-screensaver/screensaver.pri) |