From 4b97fb542e7f1744b1d2da042e9eb0d8f05ff740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 2 Aug 2013 13:53:21 +0200 Subject: [PATCH] Enable passing xcb events through NETRootInfo and NETWinInfo Requires ab8f4532f5f12db19bcc09c1f297f1b7d55efb48 from frameworks. --- events.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/events.cpp b/events.cpp index b7782f1a80..9e1f029464 100644 --- a/events.cpp +++ b/events.cpp @@ -155,8 +155,6 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e) return true; } -#warning NETRootInfo::event() needs porting to XCB -#if KWIN_QT5_PORTING if (eventType == XCB_PROPERTY_NOTIFY || eventType == XCB_CLIENT_MESSAGE) { unsigned long dirty[ NETRootInfo::PROPERTIES_SIZE ]; rootInfo()->event(e, dirty, NETRootInfo::PROPERTIES_SIZE); @@ -165,7 +163,6 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e) if (dirty[ NETRootInfo::PROTOCOLS2 ] & NET::WM2DesktopLayout) VirtualDesktopManager::self()->updateLayout(); } -#endif // events that should be handled before Clients can get them switch (eventType) { @@ -477,8 +474,7 @@ bool Workspace::workspaceEvent(QEvent* e) */ bool Client::windowEvent(xcb_generic_event_t *e) { -#if KWIN_QT5_PORTING - if (e->xany.window == window()) { // avoid doing stuff on frame or wrapper + if (findEventWindow(e) == window()) { // avoid doing stuff on frame or wrapper unsigned long dirty[ 2 ]; double old_opacity = opacity(); info->event(e, dirty, 2); // pass through the NET stuff @@ -516,7 +512,6 @@ bool Client::windowEvent(xcb_generic_event_t *e) // ### Inform the decoration } } -#endif const uint8_t eventType = e->response_type & ~0x80; switch(eventType) { @@ -1548,7 +1543,6 @@ void Client::syncEvent(xcb_sync_alarm_notify_event_t* e) bool Unmanaged::windowEvent(xcb_generic_event_t *e) { -#if KWIN_QT5_PORTING double old_opacity = opacity(); unsigned long dirty[ 2 ]; info->event(e, dirty, 2); // pass through the NET stuff @@ -1558,7 +1552,6 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e) emit opacityChanged(this, old_opacity); } } -#endif const uint8_t eventType = e->response_type & ~0x80; switch (eventType) { case XCB_UNMAP_NOTIFY: