-
Notifications
You must be signed in to change notification settings - Fork 17.1k
[Bug]: Disabling backgroundThrottling not working with hide() on Windows #31016
Copy link
Copy link
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
tickbeing logged twice per second as callbacks torequestAnimationFramecalls - Occlude the window, minimize the window, or click
Hide for 5s-> observe thetickstops being logged in all 3 cases - Click
Toggle background throttlingbutton - Occlude or minimize the window -> observe the
tickdoes not stop being logged - Click
Hide for 5s-> On Windows, observe thetickstops being logged during the 5s the window is hidden, indicating therequestAnimationFramecallbacks are being blocked. On Mac, observe thetickcontinue to be logged indicating they are not.
Reactions are currently unavailable