diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-30 16:25:56 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-30 16:25:56 -0400 |
commit | 7846ab98e9df6e171255543591e0f12c49b9391d (patch) | |
tree | 8039817b94e7f24e7e5484bba8b3beb2cc066284 /libLumina | |
parent | Make sure that lumina-open always watches files that are *not* in the XDG aut... (diff) | |
download | lumina-7846ab98e9df6e171255543591e0f12c49b9391d.tar.gz lumina-7846ab98e9df6e171255543591e0f12c49b9391d.tar.bz2 lumina-7846ab98e9df6e171255543591e0f12c49b9391d.zip |
Cleanup how auto-start apps are launched a bit (start them via a single lumina-open call now, instead of a bunch of individual ones). Also fix up the tray app detection/failover methods a bit to catch/discard tray icons which were registered/destroyed almost simultaneously (or no destroy event was ever caught for the icon). This prevents the situation where a "blank" tray icon may be trying to repaint itself repeatedly (eating up CPU cycles).
NOTE: It seems like these "blank" tray apps are all GTK based, so it might be something in that toolkit which needs fixing to prevent registering a tray window which will never be used (or is instantly destroyed).
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(); |