diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-30 15:37:56 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-30 15:57:43 +0200 |
commit | b69d64dfe615bbbfbaf317debbab5b9933895b4a (patch) | |
tree | cafb7057598eacf6fc37d817f875233cb75315a6 | |
parent | 98687d47cc64133856de187cfc2acace3f42652e (diff) | |
download | qt4-tools-b69d64dfe615bbbfbaf317debbab5b9933895b4a.tar.gz |
Prevent deadlock in XCB due to GLX calling XCB functions.
-rw-r--r-- | src/plugins/platforms/xcb/qglxintegration.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index bce3dfcc32..d42cfeb1d7 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -65,7 +65,6 @@ QGLXContext::QGLXContext(Window window, QXcbScreen *screen, const QPlatformWindo , m_drawable((Drawable)window) , m_context(0) { - const QPlatformGLContext *sharePlatformContext; if (format.useDefaultSharedContext()) { if (!QPlatformGLContext::defaultSharedContext()) { @@ -131,6 +130,7 @@ void QGLXContext::createDefaultSharedContext(QXcbScreen *screen) void QGLXContext::makeCurrent() { + m_screen->connection()->setEventProcessingEnabled(false); QPlatformGLContext::makeCurrent(); glXMakeCurrent(DISPLAY_FROM_XCB(m_screen), m_drawable, m_context); } @@ -139,11 +139,13 @@ void QGLXContext::doneCurrent() { QPlatformGLContext::doneCurrent(); glXMakeCurrent(DISPLAY_FROM_XCB(m_screen), 0, 0); + m_screen->connection()->setEventProcessingEnabled(true); } void QGLXContext::swapBuffers() { glXSwapBuffers(DISPLAY_FROM_XCB(m_screen), m_drawable); + doneCurrent(); } void* QGLXContext::getProcAddress(const QString& procName) |