aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-05 09:55:47 -0400
committerKen Moore <moorekou@gmail.com>2015-08-05 09:55:47 -0400
commit6a73f4deccb27a368d9e829fdab5b9f3f65b46ec (patch)
tree0b4c611c2f1c4210eac8c7508cdf19f89a5c77b9
parentFinish converting libLumina to XCB-only and finish replacing any LX11 functio... (diff)
downloadlumina-6a73f4deccb27a368d9e829fdab5b9f3f65b46ec.tar.gz
lumina-6a73f4deccb27a368d9e829fdab5b9f3f65b46ec.tar.bz2
lumina-6a73f4deccb27a368d9e829fdab5b9f3f65b46ec.zip
Add a replacement for XSelectInput and use it within lumina-desktop
-rw-r--r--libLumina/LuminaX11.cpp6
-rw-r--r--libLumina/LuminaX11.h1
-rw-r--r--lumina-desktop/LSession.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp
index 7033e62c..4f3822e1 100644
--- a/libLumina/LuminaX11.cpp
+++ b/libLumina/LuminaX11.cpp
@@ -1163,6 +1163,12 @@ 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
diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h
index 7318e2c2..efa51cfd 100644
--- a/libLumina/LuminaX11.h
+++ b/libLumina/LuminaX11.h
@@ -148,6 +148,7 @@ public:
QIcon WindowIcon(WId win); //_NET_WM_ICON
//Window Modification
+ void SelectInput(WId); //XSelectInput replacement (to see window events)
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 2dd841df..26cb1699 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -776,7 +776,7 @@ void LSession::startSystemTray(){
SystemTrayID = XCB->startSystemTray(0);
TrayStopping = false;
if(SystemTrayID!=0){
- XSelectInput(QX11Info::display(), SystemTrayID, InputOutput); //make sure TrayID events get forwarded here
+ XCB->SelectInput(SystemTrayID); //make sure TrayID events get forwarded here
XDamageQueryExtension( QX11Info::display(), &TrayDmgEvent, &TrayDmgError);
evFilter->setTrayDamageFlag(TrayDmgEvent);
qDebug() << "System Tray Started Successfully";
bgstack15