From a74bf353f08f45f8f5fb91573d67ad463a25ad4d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 26 Jan 2017 15:09:22 -0500 Subject: Another large batch of work on the new unified desktop. 1) Get the RootWindow up and functional. 2) Get the lumina-desktop-unified binary functional for starting to test the various pieces (not ready yet for general use) 3) Get the start-lumina-desktop binary setup to launch the new unified binary for testing if the "--unified" flag is used. --- src-qt5/core/lumina-session/main.cpp | 6 +++++- src-qt5/core/lumina-session/session.cpp | 8 ++++++-- src-qt5/core/lumina-session/session.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src-qt5/core/lumina-session') diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp index 0e076ac3..ed391e04 100644 --- a/src-qt5/core/lumina-session/main.cpp +++ b/src-qt5/core/lumina-session/main.cpp @@ -24,10 +24,13 @@ int main(int argc, char ** argv) { + bool unified = false; if (argc > 1) { if (QString(argv[1]) == QString("--version")){ qDebug() << LDesktopUtils::LuminaDesktopVersion(); return 0; + }else if(QString(argv[1]) == QString("--unified")){ + unified = true; } } if(!QFile::exists(LOS::LuminaShare())){ @@ -41,6 +44,7 @@ int main(int argc, char ** argv) //No X session found. Go ahead and re-init this binary within an xinit call QString prog = QString(argv[0]).section("/",-1); LUtils::isValidBinary(prog); //will adjust the path to be absolute + if(unified){ prog = prog+" --unified"; } QStringList args; args << prog; //if(LUtils::isValidBinary("x11vnc")){ args << "--" << "-listen" << "tcp"; } //need to be able to VNC into this session return QProcess::execute("xinit", args); @@ -78,7 +82,7 @@ int main(int argc, char ** argv) //Startup the session QCoreApplication a(argc, argv); LSession sess; - sess.start(); + sess.start(unified); int retCode = a.exec(); qDebug() << "Finished Closing Down Lumina"; return retCode; diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index 67d0e317..2e9433d1 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -77,11 +77,12 @@ void LSession::startProcess(QString ID, QString command, QStringList watchfiles) PROCS << proc; } -void LSession::start(){ +void LSession::start(bool unified){ //First check for a valid installation if(!LUtils::isValidBinary("lumina-desktop") ){ exit(1); } + if(!unified){ QSettings sessionsettings("lumina-desktop","sessionsettings"); QString WM = sessionsettings.value("WindowManager", "fluxbox").toString(); //Window Manager First @@ -151,5 +152,8 @@ void LSession::start(){ startProcess("runtime","lumina-desktop"); //ScreenSaver if(LUtils::isValidBinary("xscreensaver")){ startProcess("screensaver","xscreensaver -no-splash"); } - + }else{ + //unified process + startProcess("runtime","lumina-desktop-unified"); + } } diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index 7263a3a7..99127c07 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -73,6 +73,6 @@ public: } ~LSession(){ } - void start(); + void start(bool unified = false); }; -- cgit