Skip to content
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

EventLoop 2.0 for Android #1172

Closed
goddessfreya opened this issue Jun 20, 2019 · 2 comments
Closed

EventLoop 2.0 for Android #1172

goddessfreya opened this issue Jun 20, 2019 · 2 comments

Comments

@goddessfreya
Copy link
Contributor

Waiting on rust-windowing/winit#948, to quote:

This issue tracks the implementation of the EventLoop 2.0 rework on Android.

Winit does not currently have any contributors able to implement this. If you are interested in Winit functioning on Android, please consider implementing this.

@goddessfreya goddessfreya pinned this issue Jun 20, 2019
@goddessfreya goddessfreya added this to the Eventsloop milestone Jun 20, 2019
@goddessfreya goddessfreya modified the milestones: Eventsloop v2 (v0.22), Next Release (v0.23) Feb 16, 2020
@paulrouget paulrouget unpinned this issue Feb 19, 2020
@MarijnS95
Copy link
Member

This is coming up time and time again as users try to fix the compiler errors when targeting Android. As I've written in #1398 we'll need to figure out how to deal with the Suspended and Resumed events since newer winit doesn't have set_suspend_callback() anymore.

For the time being users can handle the events themselves and recreate the glutin context as I've done in this Android example, but this is expensive as only the surface has to be recreated. It doesn't seem to be too much effort to detach the surface from the context and dynamically add/remove it later. Then, for the user-facing side of it we can either:

  1. Give users the ability to "call in" the Suspended and Resumed events manually;
  2. Provide a single handle_events() function that users should call at the top of their run() closure, so that we can match on the event and perform the necessary steps there;
  3. Re-wrap winit's EventLoop and catch the events that way - we're reexporting it to the user anyway (this may be a significant implementation hurdle).

@kchibisov
Copy link
Member

There're no winit in glutin anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants