aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-08 07:34:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-11 09:47:52 +0100
commitb31d47e5b87f92178ced4adc15984d9960e9e01c (patch)
tree3401bbdba5aa0603bc497d6986d94620ba093fe8 /src/quick
parent0910a577f4d12eea4a099c989bd58f1dee6c88db (diff)
Animate when only one out of several windows is exposed.
Change-Id: I7f76ed722f91076ee308a47c699984d371a220f0 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp12
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");