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>
bb10
Lars Knoll 2011-08-25 09:27:13 +02:00 committed by Jørgen Lind
parent 0bb02d2108
commit 3e044662c3
1 changed files with 4 additions and 0 deletions

View File

@ -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) {