-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
14.0.0
What operating system are you using?
Windows
Operating System Version
Windows 10 build 19041.1165
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
On Windows, setting backgroundThrottling: false
on a BrowserWindow should cause throttling of things like requestAnimationFrame
to not happen when the window is occluded, minimized, or hidden.
Actual Behavior
On Windows, setting backgroundThrottling: false
on a BrowserWindow causes throttling of things like requestAnimationFrame
to not happen when the window is occluded or minimized but not hidden. On MacOS (v11.5.2 Intel x64) disabling backgroundThrottling
causes requestAnimatingFrames
to continue to work for all 3 cases -- occluded, minmized, and hidden. This is the reason I think this might be a bug on Windows.
Testcase Gist URL
https://gist.github.com/aluo-lmi/e8be4e6f23f5eca831fad332a810f99f
Additional Information
Steps for repro on gist:
- Start gist in electron (fiddle), open dev console and pop it out -> observe the
tick
being logged twice per second as callbacks torequestAnimationFrame
calls - Occlude the window, minimize the window, or click
Hide for 5s
-> observe thetick
stops being logged in all 3 cases - Click
Toggle background throttling
button - Occlude or minimize the window -> observe the
tick
does not stop being logged - Click
Hide for 5s
-> On Windows, observe thetick
stops being logged during the 5s the window is hidden, indicating therequestAnimationFrame
callbacks are being blocked. On Mac, observe thetick
continue to be logged indicating they are not.