Repository navigation
Add set_suspend_callback method for Android - #406
Conversation
tomaka
left a comment
There was a problem hiding this comment.
Thanks for the PR. Is a callback really necessary? I understand that he current model has limitations but it seems very out of place to have a callback.
| [package] | ||
| name = "winit" | ||
| version = "0.11.0" | ||
| version = "0.11.1" |
|
|
||
| /// Makes it possible for glutin to register a callback when a suspend event happens on Android | ||
| #[cfg(target_os = "android")] | ||
| pub fn set_suspend_callback(&self, cb: Option<Box<Fn(bool) -> ()>>) { |
There was a problem hiding this comment.
This method should be in the os::android module to be consistent with other similar methods.
|
We talked about implementing that callback here: rust-windowing/glutin#868 (comment) We didn´t find a good way to handle the suspend event on glutin (info here rust-windowing/glutin#868 (comment)). Is there a better way to do that now? I'll update the PR if there is a better solution |
|
I'm ok with a callback if it's specific to Android. |
Makes it possible for glutin to register a callback when a suspend event happens on Android
beb6889 to
46c036b
Compare
|
PR updated with the requested changes |
|
Could you publish v0.11.1? |
|
@MortimerGoro Please open a PR that updates the version in Cargo.toml and CHANGELOG.md. While you're at it, also add a line for the changes of #406 in the changelog. |
Makes it possible for glutin to register a callback when a suspend event happens on Android
…, r=pcwalton Simplify the cargo-c usage and generate the library as libpathfinder
|
was this method taken away? Why? #1886 |
|
I believe it was removed in favour of the |
Makes it possible for glutin to register a callback when a suspend event happens on Android.
We need it to unfork Glutin on Servo. See rust-windowing/glutin#868 for more details: