diff options
-rw-r--r-- | libLumina/LuminaX11.cpp | 11 | ||||
-rw-r--r-- | libLumina/LuminaX11.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 3b8d8414..5d1ac6f3 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -513,8 +513,13 @@ QIcon LXCB::WindowIcon(WId win){ } // === SelectInput() === -void LXCB::SelectInput(WId win){ - uint32_t mask = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_PROPERTY_CHANGE; +void LXCB::SelectInput(WId win, bool isEmbed){ + uint32_t mask; + if(isEmbed){ + mask = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_PROPERTY_CHANGE; + }else{ + mask = XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_PROPERTY_CHANGE; + } xcb_change_window_attributes(QX11Info::connection(), win, XCB_CW_EVENT_MASK, &mask ); } @@ -873,7 +878,7 @@ uint LXCB::EmbedWindow(WId win, WId container){ xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); //Now setup any redirects and return - this->SelectInput(win); //Notify of structure changes + this->SelectInput(win, true); //Notify of structure changes xcb_composite_redirect_window(QX11Info::connection(), win, XCB_COMPOSITE_REDIRECT_MANUAL); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); //Now map the window (will be a transparent child of the container) diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h index f702ddf1..b0a5d588 100644 --- a/libLumina/LuminaX11.h +++ b/libLumina/LuminaX11.h @@ -123,7 +123,7 @@ public: //Window Modification // - SubStructure simplifications (not commonly used) - void SelectInput(WId); //XSelectInput replacement (to see window events) + void SelectInput(WId win, bool isEmbed = false); //XSelectInput replacement (to see window events) uint GenerateDamageID(WId); // - General Window Modifications |