diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-01-11 23:29:23 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-01-12 19:19:26 +0000 |
commit | 93df3e3a3118080dcd6d9416d1622b88d99c4b8d (patch) | |
tree | 582046f7f35eb3050c9615bd4e15760e3027e6c5 /src/quick/scenegraph/adaptations | |
parent | c2e46b9d9140903f5b563f8835c11d4491452405 (diff) |
QSGThreadedRenderLoop: Correctly stop the animation timer ...
... when destroying the last window while it is still visible.
For the case of windowDestroyed(), the QQuickWindow can still be
isVisible true and isExposed true. Given these circumstances, we would
not stop the timer (assuming that we needed to keep it running), but
this is actually wrong when we are evaluating a timer change depending
on the window being destroyed.
By calling startOrStopAnimationTimer again, after the window has been
removed from m_windows, we will successfully stop the timer -- the only
cost being an unnecessary polish event being sent from the first call
(which will be ignored).
Task-number: QTBUG-58091
Change-Id: I043ce5d88eafee15019e1c8d41c06d531d1da059
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/quick/scenegraph/adaptations')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp index df5ec9b745..8abbefdd48 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp @@ -618,6 +618,11 @@ void QSGSoftwareThreadedRenderLoop::windowDestroyed(QQuickWindow *window) break; } } + + // Now that we altered the window list, we may need to stop the animation + // timer even if we didn't via handleObscurity. This covers the case where + // we destroy a visible & exposed QQuickWindow. + startOrStopAnimationTimer(); } void QSGSoftwareThreadedRenderLoop::exposureChanged(QQuickWindow *window) |