From 3e044662c31254377dbf2ecf666b5b9730d9c4ea Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 25 Aug 2011 09:27:13 +0200 Subject: [PATCH] Fix multithreaded GL rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Call XInitThread() before any other call to Xlib. Change-Id: I88d3a87bf31dab06b0a4c6a4cd1d32979cd70d4a Reviewed-on: http://codereview.qt.nokia.com/3571 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbintegration.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 ¶meters) { 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) {