diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-11-14 15:41:29 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-14 16:30:10 +0100 |
commit | 44e204ea9dce4681b74181c6b4bf93fbad485c64 (patch) | |
tree | a037c3db0d73ed1bb50754c27ca09a66b37fedb0 /src/quick | |
parent | c4ced2a9d4b75b100eae945220b4791d8003598f (diff) |
Avoid deadlock in Qt Creator
Task-number: QTCREATORBUG-10699
Change-Id: Ia88df5ec4ea74fda6a0449aa739a9c6976fedb02
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 0e8c189405..96dfd1c26f 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -787,8 +787,22 @@ void QSGThreadedRenderLoop::show(QQuickWindow *window) { QSG_GUI_DEBUG(window, "show()"); - if (windowFor(m_windows, window)) + if (Window *w = windowFor(m_windows, window)) { + /* Safeguard ourselves against misbehaving platform plugins. + * + * When being shown, the window should not be exposed as the + * platform plugin is only told to show after we send the show + * event. If we are already shown at this time and we don't have + * an active rendering thread we don't trust the plugin to send + * us another expose event, so make this explicit call to + * handleExposure. + * + * REF: QTCREATORBUG-10699 + */ + if (window->isExposed() && (!w->thread || !w->thread->isRunning())) + handleExposure(w); return; + } QSG_GUI_DEBUG(window, " - now tracking new window"); |