diff options
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 1d69034f5e..db3f34883f 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -769,15 +769,21 @@ void QSGThreadedRenderLoop::animationStopped() void QSGThreadedRenderLoop::startOrStopAnimationTimer() { int exposedWindows = 0; + Window *theOne = 0; for (int i=0; i<m_windows.size(); ++i) { - const Window &w = m_windows.at(i); - if (w.window->isVisible() && w.window->isExposed()) + Window &w = m_windows[i]; + if (w.window->isVisible() && w.window->isExposed()) { ++exposedWindows; + theOne = &w; + } } if (m_animation_timer != 0 && (exposedWindows == 1 || !m_animation_driver->isRunning())) { killTimer(m_animation_timer); m_animation_timer = 0; + // If animations are running, make sure we keep on animating + if (m_animation_driver->isRunning()) + maybePostPolishRequest(theOne); } else if (m_animation_timer == 0 && exposedWindows != 1 && m_animation_driver->isRunning()) { m_animation_timer = startTimer(qsgrl_animation_interval()); @@ -1077,7 +1083,7 @@ void QSGThreadedRenderLoop::polishAndSync(Window *w) killTimer(w->timerId); w->timerId = 0; - if (m_windows.size() == 1 && m_animation_driver->isRunning()) { + if (m_animation_timer == 0 && m_animation_driver->isRunning()) { RLDEBUG("GUI: - animations advancing"); m_animation_driver->advance(); RLDEBUG("GUI: - animations done"); |