aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-05 10:41:24 -0400
committerKen Moore <moorekou@gmail.com>2015-08-05 10:41:24 -0400
commitf8d8787a2fac3cf2e8b9ded09a1d8c8744eab173 (patch)
tree95a63ee97df137ee58943d2971c07992fe48df21 /libLumina
parentAdd a replacement for XSelectInput and use it within lumina-desktop (diff)
downloadlumina-f8d8787a2fac3cf2e8b9ded09a1d8c8744eab173.tar.gz
lumina-f8d8787a2fac3cf2e8b9ded09a1d8c8744eab173.tar.bz2
lumina-f8d8787a2fac3cf2e8b9ded09a1d8c8744eab173.zip
Completely finish the XLib -> XCB conversions. Now Lumina no longer requires any XLib functions/libraries/extensions.
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaX11.cpp21
-rw-r--r--libLumina/LuminaX11.h4
2 files changed, 19 insertions, 6 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)
bgstack15