summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbeventqueue.h
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-09-19 11:40:31 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2018-10-16 06:57:01 +0000
commit00ae1e6b7bf6efa5f5e57d37844e44d521604fb6 (patch)
tree7e6c8177f2f9796b30df490f8d582d6668d9f9fa /src/plugins/platforms/xcb/qxcbeventqueue.h
parentdd8a66daa497f0547f2fcddc0ee1e722d13ab98b (diff)
xcb: respect QEventLoop::ExcludeUserInputEvents in native event handlers
This was a regression from Qt 4. Before this patch, we supported filtering events only at QWindowSystemInterface level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent, we have to filter the events earlier. Now it is possible to enable/disable this feature for platforms that support native event filtering. The mapping of which events are user input events were taken from QWindowSystemInterfacePrivate::EventType. Task-number: QTBUG-69687 Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbeventqueue.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbeventqueue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.h b/src/plugins/platforms/xcb/qxcbeventqueue.h
index 0096437dba..235f2824be 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.h
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.h
@@ -41,6 +41,8 @@
#include <QtCore/QThread>
#include <QtCore/QHash>
+#include <QtCore/QEventLoop>
+#include <QtCore/QVector>
#include <xcb/xcb.h>
@@ -81,6 +83,7 @@ public:
void run() override;
bool isEmpty() const { return m_head == m_flushedTail && !m_head->event; }
+ xcb_generic_event_t *takeFirst(QEventLoop::ProcessEventsFlags flags);
xcb_generic_event_t *takeFirst();
void flushBufferedEvents();
void wakeUpDispatcher();
@@ -124,6 +127,8 @@ private:
bool m_peekerIndexCacheDirty = false;
QHash<qint32, QXcbEventNode *> m_peekerToNode;
+ QVector<xcb_generic_event_t *> m_inputEvents;
+
// debug stats
quint64 m_nodesOnHeap = 0;
};