summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbeventqueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbeventqueue.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbeventqueue.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.h b/src/plugins/platforms/xcb/qxcbeventqueue.h
index 235f2824be..11d0b8e963 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.h
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.h
@@ -43,6 +43,8 @@
#include <QtCore/QHash>
#include <QtCore/QEventLoop>
#include <QtCore/QVector>
+#include <QtCore/QMutex>
+#include <QtCore/QWaitCondition>
#include <xcb/xcb.h>
@@ -104,6 +106,8 @@ public:
bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr,
PeekOptions option = PeekDefault, qint32 peekerId = -1);
+ void waitForNewEvents(unsigned long time = ULONG_MAX);
+
private:
QXcbEventNode *qXcbEventNodeFactory(xcb_generic_event_t *event);
void dequeueNode();
@@ -131,6 +135,9 @@ private:
// debug stats
quint64 m_nodesOnHeap = 0;
+
+ QMutex m_newEventsMutex;
+ QWaitCondition m_newEventsCondition;
};
template<typename Peeker>