-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit Suspended
on every platform before LoopDestroyed
for surface-cleanup feature parity?
#3206
Comments
CC @rib @notgull @kchibisov, thoughts about this one? |
I'm fine with this |
This affects Web as well, I'm in favor of this!
Can't talk about other backends, but at least on Web this is weird because a |
On Android a When one goes out of view and is paused (because activities are mostly fullscreen) their backing surface could be One thing I haven't really looked into, but which we'll need to is loop consistency. For example on Android, do we use the proper APIs to destroy the app and receive a Footnotes
|
As we have done in #2331 by emitting
Resumed
on every platform somewhere after the loop starts (for platforms that don't have an explicit point/callback where this should happen) to consistently implement surface creation, we should likely do the same withSuspended
on loop shutdown for platforms that don't have an explicit callback here. This will allow implementers to perform surface destruction in a single consistent place too.I'm currently improving a random
winit
sample to utilize these events, and the implementation becomes clumsy when having surface destruction in bothLoopExiting
andSuspended
. It might even conflict withWindowEvent::Destroyed
.On Android I'm not yet sure if triggering a loop exit would terminate the Android app in such a way that surface destruction (==
Suspended
) is raised prior toLoopExiting
anyway.Side-note: Android supports multiple windows, and once the backend crates handle that properly perhaps
Resumed
needs to be moved to aWindowEvent
, andSuspended
will becomeDestroyed
?The text was updated successfully, but these errors were encountered: