Skip to main content

background_active

Function background_active 

Source
pub fn background_active() -> bool
Expand description

true between set_background_active(true) and the matching false.

A platform backend reads this to decide whether the runtime keeps turning while the app is off screen. Both mobile backends drive composition from the frame path, and both stop that path when the surface is gone: Android drops its GPU resources on TerminateWindow, iOS stops receiving redraws. Anything posted to the UI dispatcher then waits until the user comes back, which is wrong for an app that told the OS it has work to finish.