XCB: Force XSync after creating Window

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 <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Kai Koehne 2013-01-14 15:53:59 +01:00 committed by The Qt Project
parent 5eab554227
commit d2e64c47ce

View File

@ -382,6 +382,11 @@ void QXcbWindow::create()
if (window()->flags() & Qt::WindowTransparentForInput) if (window()->flags() & Qt::WindowTransparentForInput)
setTransparentForMouseEvents(true); 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 #ifndef QT_NO_DRAGANDDROP
connection()->drag()->dndEnable(this, true); connection()->drag()->dndEnable(this, true);
#endif #endif