summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-04-01 15:36:26 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-04-01 15:47:51 (GMT)
commit991f59a295e7678165b1db7befc9beac8bdbe503 (patch)
treeaeb8d58444baae4e412a7eddd9fa12cd2aaae863 /src/plugins/platforms/xcb/qxcbconnection.h
parent33ca59cd1827195cb7ef91a18c0775568471d4ce (diff)
downloadQt-991f59a295e7678165b1db7befc9beac8bdbe503.zip
Qt-991f59a295e7678165b1db7befc9beac8bdbe503.tar.gz
Qt-991f59a295e7678165b1db7befc9beac8bdbe503.tar.bz2
Moved all XCB event handling back into the main thread.
There are to many synchronization problems if any GL call can lead the event processing thread to stall.
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 7088184..53846f1 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -44,10 +44,8 @@
#include <xcb/xcb.h>
#include <QList>
-#include <QMutex>
+#include <QObject>
#include <QVector>
-#include <QWaitCondition>
-#include <QThread>
#define Q_XCB_DEBUG
@@ -93,10 +91,6 @@ namespace QXcbAtom {
_QT_SCROLL_DONE,
_QT_INPUT_ENCODING,
- // Qt/XCB specific
- _QT_CLOSE_CONNECTION,
- _QT_PAUSE_CONNECTION,
-
_MOTIF_WM_HINTS,
DTWM_IS_RUNNING,
@@ -222,7 +216,7 @@ namespace QXcbAtom {
class QXcbKeyboard;
-class QXcbConnection : public QThread
+class QXcbConnection : public QObject
{
Q_OBJECT
public:
@@ -242,8 +236,6 @@ public:
QXcbKeyboard *keyboard() const { return m_keyboard; }
- void setEventProcessingEnabled(bool enabled);
-
#ifdef XCB_USE_XLIB
void *xlib_display() const { return m_xlib_display; }
#endif
@@ -261,8 +253,8 @@ public:
void sync();
-protected:
- void run();
+private slots:
+ void processXcbEvents();
private:
void initializeAllAtoms();
@@ -281,12 +273,6 @@ private:
QByteArray m_displayName;
- xcb_window_t m_connectionEventListener;
- QMutex m_connectionLock;
- QWaitCondition m_connectionWaitCondition;
- QAtomicInt m_pauseId;
- bool m_enabled;
-
QXcbKeyboard *m_keyboard;
#if defined(XCB_USE_XLIB)
@@ -311,7 +297,6 @@ private:
int line;
};
QVector<CallInfo> m_callLog;
- QMutex m_callLogMutex;
void log(const char *file, int line, int sequence);
template <typename cookie_t>
friend cookie_t q_xcb_call_template(const cookie_t &cookie, QXcbConnection *connection, const char *file, int line);