A comment in the SpriteView source states that the animation
should not run when the window is minimized, nor in the middle of a minimize animation; it refers to http://crbug.com/350329 as the bug related to fixing this problem. However, although the SpriteView registers for the NSWindowWillMiniaturizeNotification it doesn't check for its occurrence, and so does not actually recognize when a window is being minimized. As a result, the SpriteView's animation continues running when its window is miniaturized. This change adds a check for NSWindowWillMiniaturizeNotification and stops the animation when caught. This change also adds a unit test to confirm that the animation stops on window miniaturization. My SpinnerView class was based on SpriteView, which is how I discovered this bug. The fix and unit test both come from SpinnerView. BUG=472836 Review URL: https://codereview.chromium.org/1052973004 Cr-Commit-Position: refs/heads/master@{#323963}
Showing
Please register or sign in to comment