rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.76k stars 892 forks source link

Implement `ApplicationHandler::create|destroy_surfaces()` #3765

Closed daxpedda closed 3 months ago

daxpedda commented 3 months ago

ApplicationHandler::resumed/suspended()s meaning has become unclear after iOS and Web implemented them. For iOS and Web they specifically mean suspending and resuming the application. For Android it specifically meant that the render surface will become invalid when suspended and must be recreated when resumed.

This PR introduces ApplicationHandler::create|destroy_surfaces(), which take the place of ApplicationHandler::resumed/suspended(). iOS and Web are now the only ones implementing ApplicationHandler::resumed/suspended().

Fixes #3699.