summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-08-25 09:27:13 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-08-25 09:39:19 +0200
commit3e044662c31254377dbf2ecf666b5b9730d9c4ea (patch)
tree20a18ce13f29462d2724bc5fbe4a8cd17774eb08 /src/plugins/platforms
parent0bb02d2108ea2c89de7f5f740f12fb245a90d3a5 (diff)
Fix multithreaded GL rendering
Call XInitThread() before any other call to Xlib. Change-Id: I88d3a87bf31dab06b0a4c6a4cd1d32979cd70d4a Reviewed-on: http://codereview.qt.nokia.com/3571 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index a512fb2e19..75936b2771 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -81,6 +81,10 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters)
{
QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
+#ifdef XCB_USE_XLIB
+ XInitThreads();
+#endif
+
m_connections << new QXcbConnection;
for (int i = 0; i < parameters.size() - 1; i += 2) {