From b69d64dfe615bbbfbaf317debbab5b9933895b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 30 Mar 2011 15:37:56 +0200 Subject: Prevent deadlock in XCB due to GLX calling XCB functions. --- src/plugins/platforms/xcb/qglxintegration.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index bce3dfc..d42cfeb 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) -- cgit v0.12