diff options
-rw-r--r-- | libLumina/LuminaX11.cpp | 21 | ||||
-rw-r--r-- | libLumina/LuminaX11.h | 4 | ||||
-rw-r--r-- | lumina-desktop/LSession.cpp | 7 | ||||
-rw-r--r-- | lumina-desktop/lumina-desktop.pro | 2 |
4 files changed, 24 insertions, 10 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 4f3822e1..5f482821 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -1163,12 +1163,6 @@ int LXCB::WindowIsFullscreen(WId win){ return fscreen; } -// === SelectInput() === -void LXCB::SelectInput(WId win){ - uint32_t mask = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY; - xcb_change_window_attributes(QX11Info::connection(), win, XCB_CW_EVENT_MASK, &mask ); -} - // === WindowIcon() === QIcon LXCB::WindowIcon(WId win){ //Fetch the _NET_WM_ICON for the window and return it as a QIcon @@ -1201,6 +1195,21 @@ QIcon LXCB::WindowIcon(WId win){ return icon; } +// === SelectInput() === +void LXCB::SelectInput(WId win){ + uint32_t mask = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY; + xcb_change_window_attributes(QX11Info::connection(), win, XCB_CW_EVENT_MASK, &mask ); +} + +// === GenerateDamageID() === +uint LXCB::GenerateDamageID(WId win){ + //Now create/register the damage handler + xcb_damage_damage_t dmgID = xcb_generate_id(QX11Info::connection()); //This is a typedef for a 32-bit unsigned integer + xcb_damage_create(QX11Info::connection(), dmgID, win, XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES); + return ( (uint) dmgID ); +} + + // === SetAsSticky() === void LXCB::SetAsSticky(WId win){ if(DEBUG){ qDebug() << "XCB: SetAsSticky()"; } diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h index efa51cfd..ef2d4629 100644 --- a/libLumina/LuminaX11.h +++ b/libLumina/LuminaX11.h @@ -148,7 +148,11 @@ public: QIcon WindowIcon(WId win); //_NET_WM_ICON //Window Modification + // - SubStructure simplifications (not commonly used) void SelectInput(WId); //XSelectInput replacement (to see window events) + uint GenerateDamageID(WId); + + // - General Window Modifications void SetAsSticky(WId); //Stick to all workspaces void SetDisableWMActions(WId); //Disable WM control (shortcuts/automatic functions) void SetAsPanel(WId); //Adjust all the window flags for a proper panel (cannot be done through Qt) diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 26cb1699..af59b769 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -19,11 +19,11 @@ #include <unistd.h> //for usleep() usage //X includes (these need to be last due to Qt compile issues) -#include <X11/Xlib.h> +/*#include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/extensions/Xrender.h> -#include <X11/extensions/Xdamage.h> +#include <X11/extensions/Xdamage.h>*/ #ifndef DEBUG #define DEBUG 0 @@ -777,7 +777,8 @@ void LSession::startSystemTray(){ TrayStopping = false; if(SystemTrayID!=0){ XCB->SelectInput(SystemTrayID); //make sure TrayID events get forwarded here - XDamageQueryExtension( QX11Info::display(), &TrayDmgEvent, &TrayDmgError); + TrayDmgEvent = XCB->GenerateDamageID(SystemTrayID); + //XDamageQueryExtension( QX11Info::display(), &TrayDmgEvent, &TrayDmgError); evFilter->setTrayDamageFlag(TrayDmgEvent); qDebug() << "System Tray Started Successfully"; if(DEBUG){ qDebug() << " - System Tray Flags:" << TrayDmgEvent << TrayDmgError; } diff --git a/lumina-desktop/lumina-desktop.pro b/lumina-desktop/lumina-desktop.pro index 5996cfab..533c1631 100644 --- a/lumina-desktop/lumina-desktop.pro +++ b/lumina-desktop/lumina-desktop.pro @@ -12,7 +12,7 @@ isEmpty(LIBPREFIX) { LIBPREFIX = $$PREFIX/lib } -LIBS += -L../libLumina -L$$LIBPREFIX -lLuminaUtils -lXdamage -lX11 -lxcb -lxcb-damage +LIBS += -L../libLumina -L$$LIBPREFIX -lLuminaUtils -lxcb -lxcb-damage QMAKE_LIBDIR = ../libLumina DEPENDPATH += ../libLumina |