From ed5ecf7ea7a482b4649e66ecb35fbc60af680684 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 25 Apr 2016 13:08:12 -0400 Subject: Rearrange the Lumina source tree quite a bit: Now the utilites are arranged by category (core, core-utils, desktop-utils), so all the -utils may be excluded by a package system (or turned into separate packages) as needed. --- src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp (limited to 'src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp') diff --git a/src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp b/src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp new file mode 100644 index 00000000..4a7c6e02 --- /dev/null +++ b/src-qt5/core/lumina-wm-INCOMPLETE/WMSession.cpp @@ -0,0 +1,62 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "WMSession.h" + +#define DEBUG 1 +// ========== +// PUBLIC +// ========== +WMSession::WMSession(){ + if(DEBUG){ qDebug() << "Creating Event Filter..."; } + EFILTER = new EventFilter(); + if(DEBUG){ qDebug() << "Creating Screen Saver..."; } + SS = new LScreenSaver(); + if(DEBUG){ qDebug() << "Creating Window Manager..."; } + WM = new LWindowManager(); + EVThread = new QThread(); + EFILTER->moveToThread(EVThread); + //Setup connections + connect(EFILTER, SIGNAL(NewInputEvent()), SS, SLOT(newInputEvent()) ); + connect(EFILTER, SIGNAL(NewManagedWindow(WId)), WM, SLOT(NewWindow(WId)) ); + connect(EFILTER, SIGNAL(WindowClosed(WId)), WM, SLOT(ClosedWindow(WId)) ); + connect(EFILTER, SIGNAL(ModifyWindow(WId, LWM::WindowAction)), WM, SLOT(ModifyWindow(WId,LWM::WindowAction)) ); + connect(SS, SIGNAL(StartingScreenSaver()), EFILTER, SLOT(StartedSS()) ); + connect(SS, SIGNAL(ClosingScreenSaver()), EFILTER, SLOT(StoppedSS()) ); + connect(WM, SIGNAL(NewFullScreenWindows(QList)), EFILTER, SLOT(FullScreenChanged(QList)) ); +} + +WMSession::~WMSession(){ +} + +void WMSession::start(bool SSONLY){ + //Get the screensaver initialized/ready + if(DEBUG){ qDebug() << "Starting Screen Saver..."; } + SS->start(); + if(SSONLY){ return; } + //Now start pulling/filtering events + if(DEBUG){ qDebug() << "Starting Window Manager..."; } + WM->start(); + if(DEBUG){ qDebug() << "Starting Event Filter..."; } + EVThread->start(); + EFILTER->start(); + if(DEBUG){ qDebug() << "Done Starting WM session..."; } +} + +// ========== +// Public Slots +// ========== +void WMSession::reloadIcons(){ + +} + +void WMSession::newInputsAvailable(QStringList inputs){ + for(int i=0; i