From d2e64c47ce63607e7c4159ad9fb6a31e6652f8b8 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 14 Jan 2013 15:53:59 +0100 Subject: XCB: Force XSync after creating Window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that dpy->request == dpy->last_request_read after setting up a new window. If we don't do this, last_request_read might never be updated until the difference hits a limit that can lead to hangs in the application (see e.g. QTCREATORBUG-8373). Task-number: QTBUG-29106 Change-Id: I390493ca6f966dc105d3ea3a2c48abec01177bc2 Reviewed-by: Uli Schlachter Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 528c4c6580..01f4d6d231 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -382,6 +382,11 @@ void QXcbWindow::create() if (window()->flags() & Qt::WindowTransparentForInput) setTransparentForMouseEvents(true); +#ifdef XCB_USE_XLIB + // force sync to read outstanding requests - see QTBUG-29106 + XSync(DISPLAY_FROM_XCB(m_screen), false); +#endif + #ifndef QT_NO_DRAGANDDROP connection()->drag()->dndEnable(this, true); #endif -- cgit v1.2.3