You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Android requires the surface to be recreated in resumed(), but this isn't the case for Web and iOS (I think), where the surface does not need to be recreated on resumed().
I'm unsure what the solution here might be, maybe it would be best to split this into two different methods, or maybe we can tell the user somehow that the Window is invalid now.
We use Occluded for stuff like that on iOS iirc, not sure about the web, but generally if you don't need to do anything you could just use Occluded as well.
Unless the state is something different than what Occluded(true) is.
No, this is not related to Occluded.
Speaking for Web: on suspended() the application will actually not be running until resumed() is fired. This is very different to Occluded, which won't stop any code from running.
@daxpedda this sounds like the original misunderstanding that "suspended" and "resumed" have anything to do with the Android lifecycle, which they also do not. This is merely supposed to be a callback on the Surface when it (dis)appears. There are separate events, that are not handled in winit currently, that signify when an app stops/starts or pauses/unpauses (more closely related to being in focus or "occluded").
If web doesn't actually need to recreate a window, resumed() is the wrong event for this. As proposed longer ago, we should perhaps provide users with such events, and rename the existing events to "surface created" and "surface removed"?
Currently Android requires the surface to be recreated in
resumed()
, but this isn't the case for Web and iOS (I think), where the surface does not need to be recreated onresumed()
.I'm unsure what the solution here might be, maybe it would be best to split this into two different methods, or maybe we can tell the user somehow that the
Window
is invalid now.Related: #3695.
The text was updated successfully, but these errors were encountered: