winit-sonoma-fix/src/platform_impl
Marijn Suijten 472d7b9376
android: Hold NativeWindow lock until after notifying the user with Event::Suspended (#2307)
This applies https://github.com/rust-windowing/android-ndk-rs/issues/117
on the `winit` side: Android destroys its window/surface as soon as the
user returns from [`onNativeWindowDestroyed`], and we "fixed" this on
the `ndk-glue` side by sending the `WindowDestroyed` event before
locking the window and removing it: this lock has to wait for any user
of `ndk-glue` - ie. `winit` - to give up its readlock on the window,
which is what we utilize here to give users of `winit` "time" to destroy
any resource created on top of a `RawWindowHandle`.

since we can't pass the user a `RawWindowHandle` through the
`HasRawWindowHandle` trait we have to document this case explicitly and
keep the lock alive on the `winit` side instead.

[`onNativeWindowDestroyed`]: https://developer.android.com/ndk/reference/struct/a-native-activity-callbacks#onnativewindowdestroyed
2022-07-14 12:35:49 +02:00
..
android android: Hold NativeWindow lock until after notifying the user with Event::Suspended (#2307) 2022-07-14 12:35:49 +02:00
ios Add refresh_rate_millihertz for MonitorHandle 2022-07-08 13:25:56 +03:00
linux On Wayland, drop wl_surface on window close 2022-07-09 21:41:18 +03:00
macos Add refresh_rate_millihertz for MonitorHandle 2022-07-08 13:25:56 +03:00
web web: Add EventLoop::spawn (#2208) 2022-07-13 17:17:18 +02:00
windows Add refresh_rate_millihertz for MonitorHandle 2022-07-08 13:25:56 +03:00
mod.rs Merge branch 'master' into merge-master-to-web 2019-09-24 14:21:18 -04:00