use qt native event filter instead of xlib directly
[projets/fookb-qt.git] / xcbEventFilter.cpp
1 #include "xcbEventFilter.h"
2 #include <QApplication>
3 #include <QDebug>
4
5 #include <xcb/xcb.h>
6
7 XcbEventFilter::XcbEventFilter()
8 {
9 }
10
11 XcbEventFilter::~XcbEventFilter()
12 {
13 }
14
15 bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *)
16 {
17     if (eventType == "xcb_generic_event_t") {
18         xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
19         qDebug() << "XCB Event";
20         // ...
21     }
22     return false;
23 }