Stop the update timer when no windows are visible
authorGunnar Sletta <gunnar.sletta@digia.com>
Wed, 7 Aug 2013 08:07:34 +0000 (10:07 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 7 Aug 2013 09:00:32 +0000 (11:00 +0200)
Change-Id: Ib9758a99891829d9bec81996687373d08ecfa055
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
src/quick/scenegraph/qsgthreadedrenderloop.cpp

index 1e0d7c5..15b6bdc 100644 (file)
@@ -963,8 +963,11 @@ void QSGThreadedRenderLoop::releaseResources(QQuickWindow *window, bool inDestru
 
 void QSGThreadedRenderLoop::polishAndSync()
 {
-    if (!anyoneShowing())
+    if (!anyoneShowing()) {
+        killTimer(m_update_timer);
+        m_update_timer = 0;
         return;
+    }
 
     RLDEBUG("GUI: polishAndSync()");