aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/LSession.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-01-30 05:49:30 -0500
committerKen Moore <ken@ixsystems.com>2018-01-30 05:49:30 -0500
commitfc138f1492c0275215327cfe698587916107b69f (patch)
treef1db15573ee9e8ecf7618214cf28f381ba6c0632 /src-qt5/core/lumina-desktop-unified/LSession.cpp
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-fc138f1492c0275215327cfe698587916107b69f.tar.gz
lumina-fc138f1492c0275215327cfe698587916107b69f.tar.bz2
lumina-fc138f1492c0275215327cfe698587916107b69f.zip
A few couple other attempts at the layering issue.
Tie-in the new OSInterface class to the QML data store (RootObject). This will allow the new system status functions to be accessible to the QML interface.
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/LSession.cpp')
-rw-r--r--src-qt5/core/lumina-desktop-unified/LSession.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp
index 69c42c73..dcd1688f 100644
--- a/src-qt5/core/lumina-desktop-unified/LSession.cpp
+++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp
@@ -31,6 +31,7 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu
qRegisterMetaType< NativeWindowSystem::MouseButton >("NativeWindowSystem::MouseButton");
mediaObj = 0; //private object used for playing login/logout chimes
+ OSThread = 0;
if(this->isPrimaryProcess()){
//Setup the global registrations
qsrand(QDateTime::currentMSecsSinceEpoch());
@@ -57,7 +58,9 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu
Lumina::APPLIST = XDGDesktopList::instance();
Lumina::ROOTWIN = new RootWindow();
Lumina::SHORTCUTS = new LShortcutEvents(); //this can be moved to it's own thread eventually as well
-
+ OSThread = new QThread();
+ OSInterface::instance()->moveToThread(OSThread);
+ OSThread->start();
setupGlobalConnections();
} //end check for primary process
}
@@ -75,6 +78,12 @@ LSession::~LSession(){
if(Lumina::ROOTWIN!=0){ Lumina::ROOTWIN->deleteLater(); }
if(Lumina::APPLIST!=0){ Lumina::APPLIST->deleteLater(); }
if(Lumina::DESKMAN!=0){ Lumina::DESKMAN->deleteLater(); }
+ if(OSInterface::instance()->isRunning()){ OSInterface::instance()->stop(); }
+ OSInterface::instance()->deleteLater();
+ if(OSThread!=0){
+ if(OSThread->isRunning()){ OSThread->quit(); }
+ OSThread->deleteLater();
+ }
}
void LSession::setupSession(){
@@ -108,6 +117,7 @@ void LSession::setupSession(){
//checkUserFiles(); //adds these files to the watcher as well
Lumina::NWS->setRoot_numberOfWorkspaces(QStringList() << "one" << "two");
Lumina::NWS->setRoot_currentWorkspace(0);
+ if(!OSInterface::instance()->isRunning()){ OSInterface::instance()->start(); }
Lumina::DESKMAN->start();
Lumina::ROOTWIN->start();
bgstack15