diff options
Diffstat (limited to 'libLumina')
-rw-r--r-- | libLumina/LuminaX11.cpp | 2 | ||||
-rw-r--r-- | libLumina/LuminaX11.h | 21 |
2 files changed, 10 insertions, 13 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index f5aab49f..11c0f0ef 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -842,7 +842,7 @@ void LXCB::ReserveLocation(WId win, QRect geom, QString loc){ uint LXCB::EmbedWindow(WId win, WId container){ if(DEBUG){ qDebug() << "XCB: EmbedWindow()"; } //This returns the damage control ID number (or 0 for a failure) - if(win==0 || container==0){ return 0; } + if(win==0 || container==0 || LXCB::WindowClass(win).isEmpty() ){ return 0; } //invalid window (destroyed before getting here?) //qDebug() << "Embed Window:" << win << container; //Initialize any atoms that will be needed diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h index b6431fc6..201b8576 100644 --- a/libLumina/LuminaX11.h +++ b/libLumina/LuminaX11.h @@ -21,19 +21,13 @@ #include <QDebug> #include <QPainter> #include <QObject> +#include <QFlags> // Addition includes for compilations (cause issues with X11 libs later) -#include <QDir> -#include <QEvent> -#include <QHeaderView> +//#include <QDir> +//#include <QEvent> +//#include <QHeaderView> - -//X includes (these need to be last due to Qt compile issues) -//#include <X11/Xlib.h> -//#include <X11/Xutil.h> -//#include <X11/Xatom.h> -//#include <X11/extensions/Xrender.h> - #include <xcb/xcb_ewmh.h> //SYSTEM TRAY STANDARD DEFINITIONS @@ -51,8 +45,11 @@ class LXCB{ public: enum WINDOWSTATE {IGNORE, INVISIBLE, VISIBLE, ACTIVE, ATTENTION}; //note that this in order of priority enum ICCCM_STATE {WITHDRAWN, NORMAL, ICONIC}; - enum ICCCM_PROTOCOLS {TAKE_FOCUS, DELETE_WINDOW}; - + //Now enums which can have multiple values at once + enum ICCCM_PROTOCOL {TAKE_FOCUS = 0x0, DELETE_WINDOW = 0x1}; //any combination + Q_DECLARE_FLAGS(ICCCM_PROTOCOLS, ICCCM_PROTOCOL); + + xcb_ewmh_connection_t EWMH; //This is where all the screen info and atoms are located LXCB(); |