aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop-unified/global-objects.h15
-rw-r--r--src-qt5/core/lumina-desktop-unified/lumina-desktop.pro106
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.cpp)175
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.h)73
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-events/events.pri6
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.cpp)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.h)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.ui (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.ui)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.cpp)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.h)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp (renamed from src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.cpp)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.h)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp (renamed from src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.cpp)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.h)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h (renamed from src-qt5/core/lumina-desktop-unified/src-WM/animations/SampleAnimation.h)0
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/animations/animations.pri (renamed from src-qt5/core/lumina-desktop-unified/src-WM/animations/animations.pri)2
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri15
17 files changed, 237 insertions, 155 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/global-objects.h b/src-qt5/core/lumina-desktop-unified/global-objects.h
index 84133563..043bc46c 100644
--- a/src-qt5/core/lumina-desktop-unified/global-objects.h
+++ b/src-qt5/core/lumina-desktop-unified/global-objects.h
@@ -18,11 +18,11 @@
#include "global-includes.h"
//Load the appropriate "EventFilter" class for the graphics subsystem
-#ifndef USE_WAYLAND
-#include "src-WM/LXcbEventFilter.h"
-#endif
+//#ifndef USE_WAYLAND
+#include <LXcbEventFilter.h>
+//#endif
-#include "src-WM/LScreenSaver.h"
+#include "<LScreenSaver.h>"
#include "src-WM/LWindowManager.h"
//Any special defines for settings/testing
@@ -34,12 +34,11 @@ namespace Lumina{
enum WindowAction{MoveResize, Show, Hide, TryClose, Closed, WA_NONE};
//Data structures and objects
- extern LXCB *SYSTEM; //Native graphic system interface
- EventFilter *EFILTER; //Native Event Watcher
+ extern EventFilter *EFILTER; //Native Event Watcher
//ScreenSaver
- LScreenSaver *SS;
+ extern LScreenSaver *SS;
//Window Manager
- LWindowManager *WM;
+ //LWindowManager *WM;
QThread *EVThread; //X Event thread
diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
index 4b725288..8c72541c 100644
--- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
@@ -5,7 +5,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets x11extras multimedia concurrent
-TARGET = lumina-desktop
+TARGET = lumina-desktop-unified
target.path = $${L_BINDIR}
#include all the special classes from the Lumina tree
@@ -16,106 +16,30 @@ include(../libLumina/LuminaX11.pri)
include(../libLumina/LuminaSingleApplication.pri)
include(../libLumina/LuminaThemes.pri)
-#LIBS += -lLuminaUtils -lxcb -lxcb-damage
-#DEPENDPATH += ../libLumina
-
TEMPLATE = app
SOURCES += main.cpp \
- WMProcess.cpp \
- LXcbEventFilter.cpp \
LSession.cpp \
- LDesktop.cpp \
- LDesktopBackground.cpp \
- LDesktopPluginSpace.cpp \
- LPanel.cpp \
- LWinInfo.cpp \
- AppMenu.cpp \
- SettingsMenu.cpp \
- SystemWindow.cpp \
- BootSplash.cpp \
- desktop-plugins/LDPlugin.cpp
-
-
-HEADERS += Globals.h \
- WMProcess.h \
- LXcbEventFilter.h \
+ BootSplash.cpp
+
+HEADERS += global-includes.h \
+ global-objects.h \
LSession.h \
- LDesktop.h \
- LDesktopBackground.h \
- LDesktopPluginSpace.h \
- LPanel.h \
- LWinInfo.h \
- AppMenu.h \
- SettingsMenu.h \
- SystemWindow.h \
- BootSplash.h \
- panel-plugins/LPPlugin.h \
- panel-plugins/NewPP.h \
- panel-plugins/LTBWidget.h \
- desktop-plugins/LDPlugin.h \
- desktop-plugins/NewDP.h \
- JsonMenu.h
-
-FORMS += SystemWindow.ui \
- BootSplash.ui
+ BootSplash.h
+
+FORMS += BootSplash.ui
+
+include(src-screensaver/screensaver.pri)
#Now include all the files for the various plugins
-include(panel-plugins/panel-plugins.pri)
-include(desktop-plugins/desktop-plugins.pri)
+#include(panel-plugins/panel-plugins.pri)
+#include(desktop-plugins/desktop-plugins.pri)
-RESOURCES+= Lumina-DE.qrc
desktop.path = $${L_SESSDIR}
-desktop.files = Lumina-DE.desktop
-
-icons.files = Lumina-DE.png \
- Insight-FileManager.png
-icons.path = $${L_SHAREDIR}/pixmaps
-
-fluxconf.files = fluxboxconf/fluxbox-init-rc \
- fluxboxconf/fluxbox-keys
-fluxconf.path = $${L_SHAREDIR}/lumina-desktop/
-
-wallpapers.files = wallpapers/Lumina_Wispy_gold.jpg \
- wallpapers/Lumina_Wispy_green.jpg \
- wallpapers/Lumina_Wispy_purple.jpg \
- wallpapers/Lumina_Wispy_red.jpg \
- wallpapers/Lumina_Wispy_blue-grey.jpg \
- wallpapers/Lumina_Wispy_blue-grey-zoom.jpg \
- wallpapers/Lumina_Wispy_grey-blue.jpg \
- wallpapers/Lumina_Wispy_grey-blue-zoom.jpg
-wallpapers.path = $${L_SHAREDIR}/wallpapers/Lumina-DE
-
-
-defaults.files = defaults/luminaDesktop.conf \
- defaults/compton.conf \
- audiofiles/Logout.ogg \
- audiofiles/Login.ogg \
- audiofiles/low-battery.ogg
-defaults.path = $${L_SHAREDIR}/lumina-desktop/
-
-conf.path = $${L_ETCDIR}
-
-#Now do any OS-specific defaults (if available)
-#First see if there is a known OS override first
-!isEmpty(DEFAULT_SETTINGS){
- message("Installing defaults settings for OS: $${DEFAULT_SETTINGS}")
- OS=$${DEFAULT_SETTINGS}
-}
-exists("defaults/luminaDesktop-$${OS}.conf"){
- message(" -- Found OS-specific system config file: $${OS}");
- conf.extra = cp defaults/luminaDesktop-$${OS}.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
-}else{
- conf.extra = cp defaults/luminaDesktop.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
-}
-exists("defaults/desktop-background-$${OS}.jpg"){
- message(" -- Found OS-specific background image: $${OS}");
- defaults.extra = cp defaults/desktop-background-$${OS}.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
-}else{
- defaults.extra = cp defaults/desktop-background.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
-}
+desktop.files = lumina-desktop.desktop
+
TRANSLATIONS = i18n/lumina-desktop_af.ts \
i18n/lumina-desktop_ar.ts \
@@ -183,7 +107,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \
dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/
dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/
-INSTALLS += target desktop icons wallpapers defaults conf fluxconf
+INSTALLS += target desktop
WITH_I18N{
INSTALLS += dotrans
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp
index 0a7ca536..e2b1cb2c 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.cpp
@@ -8,13 +8,19 @@
//==================================================
// NOTE: All the XCB interactions and atoms are accessed via:
-// Lumina::SYSTEM->EWMH.(atom name)
-// Lumina::SYSTEM->(do something)
-// (Lumina::SYSTEM is the global XCB structure)
+// obj->XCB->EWMH.(atom name)
+// obj->XCB->(do something)
//==================================================
#include "global-objects.h"
+//SYSTEM TRAY STANDARD DEFINITIONS
+#define SYSTEM_TRAY_REQUEST_DOCK 0
+#define SYSTEM_TRAY_BEGIN_MESSAGE 1
+#define SYSTEM_TRAY_CANCEL_MESSAGE 2
+
+
#define DEBUG 1
+
// Also keep the root window/screen around for use in the filters
namespace L_XCB{
xcb_screen_t *root_screen;
@@ -23,10 +29,10 @@ namespace L_XCB{
//Constructor for the Event Filter wrapper
EventFilter::EventFilter() : QObject(){
+ XCB = new LXCB();
EF = new XCBEventFilter(this);
L_XCB::root_screen = xcb_aux_get_screen(QX11Info::connection(), QX11Info::appScreen());
L_XCB::root = L_XCB::root_screen->root;
- SSLocked = false;
WMFlag = 0;
}
@@ -34,23 +40,69 @@ void EventFilter::start(){
if(DEBUG){ qDebug() << " - Install event filter..."; }
QCoreApplication::instance()->installNativeEventFilter(EF);
if(DEBUG){ qDebug() << " - Run request check..."; }
- if(!Lumina::SYSTEM->setupEventsForRoot()){
+ if(!XCB->setupEventsForRoot()){
qCritical() << "[ERROR] Unable to setup WM event retrieval. Is another WM running?";
exit(1);
}
if(DEBUG){ qDebug() << " - Create WM ID Window"; }
- WMFlag = Lumina::SYSTEM->WM_CreateWindow();
- Lumina::SYSTEM->setupEventsForRoot(WMFlag);
- Lumina::SYSTEM->WM_Set_Supporting_WM(WMFlag);
+ WMFlag = XCB->WM_CreateWindow();
+ XCB->setupEventsForRoot(WMFlag);
+ XCB->WM_Set_Supporting_WM(WMFlag);
+
+ EF->startSystemTray();
+
QCoreApplication::instance()->flush();
}
-
+
+void EventFilter::stop(){
+ EF->stopSystemTray();
+}
+
+QList<WId> EventFilter::currentTrayApps(){
+ return EF->trayApps();
+}
+
+//=============================
+// XCBEventFilter Class
+//=============================
+
//Constructor for the XCB event filter
XCBEventFilter::XCBEventFilter(EventFilter *parent) : QAbstractNativeEventFilter(){
obj = parent;
+ SystemTrayID = 0;
+ TrayDmgID = 0;
InitAtoms();
}
+void XCBEventFilter::InitAtoms(){
+ //Initialize any special atoms that we need to save/use regularly
+ //NOTE: All the EWMH atoms are already saved globally in obj->XCB->EWMH
+ WinNotifyAtoms.clear();
+ WinNotifyAtoms << obj->XCB->EWMH._NET_WM_NAME \
+ << obj->XCB->EWMH._NET_WM_VISIBLE_NAME \
+ << obj->XCB->EWMH._NET_WM_ICON_NAME \
+ << obj->XCB->EWMH._NET_WM_VISIBLE_ICON_NAME \
+ << obj->XCB->EWMH._NET_WM_ICON \
+ << obj->XCB->EWMH._NET_WM_ICON_GEOMETRY;
+
+ SysNotifyAtoms.clear();
+ SysNotifyAtoms << obj->XCB->EWMH._NET_CLIENT_LIST \
+ << obj->XCB->EWMH._NET_CLIENT_LIST_STACKING \
+ << obj->XCB->EWMH._NET_CURRENT_DESKTOP \
+ << obj->XCB->EWMH._NET_WM_STATE \
+ << obj->XCB->EWMH._NET_ACTIVE_WINDOW \
+ << obj->XCB->EWMH._NET_WM_ICON \
+ << obj->XCB->EWMH._NET_WM_ICON_GEOMETRY;
+}
+
+bool XCBEventFilter::startSystemTray(){
+
+}
+
+bool XCBEventFilter::stopSystemTray(){
+
+}
+
//This function format taken directly from the Qt5.3 documentation
bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE
{
@@ -84,8 +136,8 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
stopevent = BlockInputEvent( ((xcb_button_press_event_t *) ev)->root ); //use the main "root" window - not the child widget
if(!stopevent){
//Activate the window right now if needed
- if(LWM::SYSTEM->WM_Get_Active_Window()!=((xcb_button_press_event_t *) ev)->root){
- LWM::SYSTEM->WM_Set_Active_Window( ((xcb_button_press_event_t *) ev)->root);
+ if(obj->XCB->WM_Get_Active_Window()!=((xcb_button_press_event_t *) ev)->root){
+ obj->XCB->WM_Set_Active_Window( ((xcb_button_press_event_t *) ev)->root);
}
}
break;
@@ -137,7 +189,9 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
//==============================
case XCB_DESTROY_NOTIFY:
qDebug() << "Window Closed Event";
- obj->emit WindowClosed( ((xcb_destroy_notify_event_t *) ev)->window );
+ if( !rmTrayApp( ((xcb_destroy_notify_event_t *) ev)->window ) ){
+ obj->emit WindowClosed( ((xcb_destroy_notify_event_t *) ev)->window );
+ }
break;
//==============================
case XCB_FOCUS_IN:
@@ -156,6 +210,14 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
case XCB_CLIENT_MESSAGE:
//qDebug() << "Client Message Event";
//qDebug() << " - Given Window:" << ((xcb_client_message_event_t*)ev)->window;
+ if( ((xcb_client_message_event_t*)ev)->type == _NET_SYSTEM_TRAY_OPCODE && ((xcb_client_message_event_t*)ev)->format == 32){
+ //data32[0] is timestamp, [1] is opcode, [2] is window handle
+ if(SYSTEM_TRAY_REQUEST_DOCK == ((xcb_client_message_event_t*)ev)->data.data32[1]){
+ addTrayApp( ((xcb_client_message_event_t*)ev)->data.data32[2] );
+ }
+ //Ignore the System Tray messages at the moment
+
+ }
break;
//==============================
case XCB_CONFIGURE_NOTIFY:
@@ -175,7 +237,11 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
case XCB_GE_GENERIC:
break; //generic event - don't do anything special
default:
- qDebug() << "Default Event:" << (ev->response_type & ~0x80);
+ //if( (ev->response_type & ~0x80)==TrayDmgID){
+ checkDamageID( ((xcb_damage_notify_event_t*)ev)->drawable );
+ //}else{
+ qDebug() << "Default Event:" << (ev->response_type & ~0x80);
+ //}
//==============================
}
}
@@ -183,18 +249,97 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
//never stop event handling (this will not impact the X events themselves - just the internal screensaver/WM/widgets)
}
+//System Tray Functions
+QList<WId> XCBEventFilter::trayApps(){
+ //return the list of all current tray apps
+ //Check the validity of all the current tray apps (make sure nothing closed erratically)
+ for(int i=0; i<RunningTrayApps.length(); i++){
+ if(obj->XCB->WindowClass(RunningTrayApps[i]).isEmpty()){
+ obj->emit Tray_AppClosed(RunningTrayApps.takeAt(i) );
+ i--;
+ }
+ }
+ return RunningTrayApps;
+}
+
+bool XCBEventFilter::startSystemTray(){
+ if(SystemTrayID != 0){ return; } //already started
+ RunningTrayApps.clear(); //nothing running yet
+ SystemTrayID = obj->XCB->startSystemTray(0);
+ if(SystemTrayID!=0){
+ obj->XCB->SelectInput(SystemTrayID); //make sure TrayID events get forwarded here
+ TrayDmgID = obj->XCB->GenerateDamageID(SystemTrayID);
+ qDebug() << "System Tray Started Successfully";
+ if(DEBUG){ qDebug() << " - System Tray Flags:" << TrayDmgID; }
+ }
+ return (SystemTrayID!=0);
+}
+
+bool XCBEventFilter::stopSystemTray(){
+ if(SystemTrayID==0){ return; } //already stopped
+ qDebug() << "Stopping system tray...";
+ //Close all the running Tray Apps
+ QList<WId> tmpApps = RunningTrayApps;
+ //RunningTrayApps.clear(); //clear this ahead of time so tray's do not attempt to re-access the apps
+ //Close all the running tray apps
+ for(int i=0; i<tmpApps.length(); i++){
+ qDebug() << " - Stopping tray app:" << obj->XCB->WindowClass(tmpApps[i]);
+ //Tray apps are special and closing the window does not close the app
+ obj->XCB->KillClient(tmpApps[i]);
+ }
+ //Now close down the tray backend
+ obj->XCB->closeSystemTray(SystemTrayID);
+ SystemTrayID = 0;
+ TrayDmgID = 0;
+}
+
+//=========
+// PRIVATE
+//=========
bool XCBEventFilter::BlockInputEvent(WId win){
//Checks the current state of the WM and sets the stop flag as needed
// - Always let the screensaver know about the event first (need to reset timers and such)
obj->emit NewInputEvent();
// - Check the state of the screensaver
- if(obj->SSLocked){ qDebug() << "SS Locked"; return true; }
+ if(SS->isLocked()){ qDebug() << "SS Locked"; return true; }
// - Check the state of any fullscreen apps
- else if( win!=0 && !obj->FS_WINS.isEmpty()){
+ /*else if( win!=0 && !obj->FS_WINS.isEmpty()){
if(!obj->FS_WINS.contains(win) ){
//If this event is for an app underneath a fullscreen window - stop it
if(obj->FS_WINS.length() == QApplication::desktop()->screenCount()){ qDebug() << "Screens Covered"; return true; } //all screens covered right now
}
+ }*/
+ return false;
+}
+
+//System Tray functions
+void XCBEventFilter::addTrayApp(WId win){
+ if(SystemTrayID==0){ return; }
+ if(RunningTrayApps.contains(win)){ return; } //already managed
+ qDebug() << "Session Tray: Window Added" << obj->XCB->windowClass(win);
+ RunningTrayApps << win;
+ if(DEBUG){ qDebug() << "Tray List Changed"; }
+ obj->emit Tray_AppAdded(win);
+}
+
+bool XCBEventFilter::rmTrayApp(WId win){
+ //returns "true" if the tray app was found and removed
+ if(SystemTrayID==0){ return false; }
+ for(int i=0; i<RunningTrayApps.length(); i++){
+ if(win==RunningTrayApps[i]){
+ qDebug() << "Session Tray: Window Removed";
+ RunningTrayApps.removeAt(i);
+ obj->emit Tray_AppClosed(win);
+ return true;
+ }
}
return false;
}
+
+void XCBEventFilter::checkDamageID(WId id){
+ if(runningTrayApps.contains(id)){
+ obj->emit Tray_AppUpdated(id);
+ }else{
+ //Could check for window damage ID's - but we should not need this
+ }
+}
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.h b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h
index b68eedf5..6726ef8b 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LXcbEventFilter.h
+++ b/src-qt5/core/lumina-desktop-unified/src-events/LXcbEventFilter.h
@@ -1,10 +1,10 @@
//===========================================
// Lumina-DE source code
-// Copyright (c) 2012, Ken Moore
+// Copyright (c) 2012-2017, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
-// This class provides the XCB ->Xlib conversion necessary for Qt5 usage
+// This class provides the XCB event handling/registrations that are needed
//===========================================
#ifndef _LUMINA_DESKTOP_XCB_FILTER_H
#define _LUMINA_DESKTOP_XCB_FILTER_H
@@ -41,12 +41,7 @@ XCB_COLORMAP_NOTIFY
XCB_CLIENT_MESSAGE
*/
-//SYSTEM TRAY STANDARD DEFINITIONS
-//#define SYSTEM_TRAY_REQUEST_DOCK 0
-//#define SYSTEM_TRAY_BEGIN_MESSAGE 1
-//#define SYSTEM_TRAY_CANCEL_MESSAGE 2
-
-
+
class EventFilter : public QObject{
Q_OBJECT
private:
@@ -58,21 +53,26 @@ public:
~EventFilter(){}
void start();
-
- //Public variables for the event filter to use/check
- QList<WId> FS_WINS; //Full-screen windows (1 per monitor) - used for hiding non-app events as needed
- bool SSLocked;
-
+ void stop();
+
+ //Public System Tray Functions
+ QList<WId> currentTrayApps();
+
+ //Variables/Functions needed by the XCBEventFilter class only (not really needed by anything else)
+ LXCB *XCB; //used to interact with the X11 graphics subsystem
+
public slots:
- void StartedSS(){ SSLocked = true; }
- void StoppedSS(){ SSLocked = false; }
- void FullScreenChanged(QList<WId> fslist){ FS_WINS = fslist; }
signals:
void NewInputEvent();
void NewManagedWindow(WId);
void WindowClosed(WId);
void ModifyWindow(WId win, LWM::WindowAction);
+
+ //System Tray Signals
+ void Tray_AppAdded(WId); //new tray app registered
+ void Tray_AppClosed(WId); //tray app de-registered
+ void Tray_AppUpdated(WId); //tray app appearance changed (damage event)
};
class XCBEventFilter : public QAbstractNativeEventFilter{
@@ -82,34 +82,27 @@ public:
virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *);
+ //System Tray Functions
+ QList<WId> trayApps(); //return the list of all current tray apps
+ bool startSystemTray();
+ bool stopSystemTray();
+
private:
EventFilter *obj;
QList<xcb_atom_t> WinNotifyAtoms, SysNotifyAtoms;
+ void InitAtoms();
+
+ bool BlockInputEvent(WId win = 0); //Checks the current state of the system to see if the event should be stopped
+
+ //System Tray Variables
+ WId SystemTrayID;
+ int TrayDmgID;
+ QList<WId> RunningTrayApps;
+ //System Tray functions
+ void addTrayApp(WId);
+ bool rmTrayApp(WId); //returns "true" if the tray app was found and removed
+ void checkDamageID(WId);
- void InitAtoms(){
- //Initialize any special atoms that we need to save/use regularly
- //NOTE: All the EWMH atoms are already saved globally in LWM::SYSTEM->EWMH
- WinNotifyAtoms.clear();
- WinNotifyAtoms << LWM::SYSTEM->EWMH._NET_WM_NAME \
- << LWM::SYSTEM->EWMH._NET_WM_VISIBLE_NAME \
- << LWM::SYSTEM->EWMH._NET_WM_ICON_NAME \
- << LWM::SYSTEM->EWMH._NET_WM_VISIBLE_ICON_NAME \
- << LWM::SYSTEM->EWMH._NET_WM_ICON \
- << LWM::SYSTEM->EWMH._NET_WM_ICON_GEOMETRY;
-
- SysNotifyAtoms.clear();
- SysNotifyAtoms << LWM::SYSTEM->EWMH._NET_CLIENT_LIST \
- << LWM::SYSTEM->EWMH._NET_CLIENT_LIST_STACKING \
- << LWM::SYSTEM->EWMH._NET_CURRENT_DESKTOP \
- << LWM::SYSTEM->EWMH._NET_WM_STATE \
- << LWM::SYSTEM->EWMH._NET_ACTIVE_WINDOW \
- << LWM::SYSTEM->EWMH._NET_WM_ICON \
- << LWM::SYSTEM->EWMH._NET_WM_ICON_GEOMETRY;
-
- }
-
- bool BlockInputEvent(WId win = 0); //Checks the current state of the WM and sets the stop flag as needed
-
//Longer Event handling functions
//bool ParseKeyPressEvent();
//bool ParseKeyReleaseEvent();
diff --git a/src-qt5/core/lumina-desktop-unified/src-events/events.pri b/src-qt5/core/lumina-desktop-unified/src-events/events.pri
new file mode 100644
index 00000000..38225d7f
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-events/events.pri
@@ -0,0 +1,6 @@
+SOURCES *= $${PWD}/LXCBEventFilter.cpp
+
+HEADERS *= $${PWD}/LXCBEventFilter.h
+
+#update the includepath so we can just (#include <LXCBEventFilter.h>) as needed without paths
+INCLUDEPATH *= ${PWD}
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp
index 4cc6d68b..4cc6d68b 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.h
index 040499c1..040499c1 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.h
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.ui b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.ui
index 7f0b45b8..7f0b45b8 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LLockScreen.ui
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.ui
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
index 0c92784e..0c92784e 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h
index 5119d8b1..5119d8b1 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/LScreenSaver.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
index 83b82ff8..83b82ff8 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h
index a6574679..a6574679 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/SSBaseWidget.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp
index 1e55dc76..1e55dc76 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h
index dd7269d4..dd7269d4 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/animations/BaseAnimGroup.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/animations/SampleAnimation.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h
index e0f11ba5..e0f11ba5 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/animations/SampleAnimation.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h
diff --git a/src-qt5/core/lumina-desktop-unified/src-WM/animations/animations.pri b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/animations.pri
index 5473d4e1..adb1ed6c 100644
--- a/src-qt5/core/lumina-desktop-unified/src-WM/animations/animations.pri
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/animations.pri
@@ -3,4 +3,4 @@ SOURCES += $$PWD/BaseAnimGroup.cpp
HEADERS += $$PWD/BaseAnimGroup.h \
$$PWD/SampleAnimation.h
-FORMS += \ No newline at end of file
+#FORMS +=
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri
new file mode 100644
index 00000000..f95891c1
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri
@@ -0,0 +1,15 @@
+SOURCES *= $${PWD}/LLockScreen.cpp \
+ $${PWD}/LScreenSaver.cpp \
+ $${PWD}/SSBaseWidget.cpp
+
+HEADERS *= $${PWD}/LLockScreen.h \
+ $${PWD}/LScreenSaver.h \
+ $${PWD}/SSBaseWidget.h
+
+FORMS *= $${PWD}/LLockScreen.ui
+
+#update the includepath so we can just (#include <LScreenSaver.h>) as needed without paths
+INCLUDEPATH *= ${PWD}
+
+#Now include all the screensaver animations/options
+include(animations/animations.pri)
bgstack15