Update to winit 0.30 - #61
Conversation
|
Maybe I should trigger a request redraw whenever a potentially relevant event happens? |
|
Is there a way to make this without having to wrap under application handler? Just updating state with events... Kind of like it used to be. Is there something preventing that? I'm not too fond of the winit's new api, but also i've not yet attempted to update my libs so haven't formed a full opinion. |
|
Yes, that's possible. The downside would be that it'd be the user's responsibility to call a winit-input-helper method in 3 places: But I suppose even with that downside, such an API would be worthwhile to have. |
|
Many thanks for your work on this, I have completed the move to winit 0.30.0 here: #68 |
Overhauls the public API to support winit 0.30
One thing to note is that I moved the "update" logic from AboutToWait to RedrawRequested.
This isn't optimal, as it doesn't call update if there is no redrawing. So a hello world app that never triggers a redraw would also not respond to quit events and such.
Using
AboutToWaitcomes with a different issue https://docs.rs/winit/latest/winit/application/trait.ApplicationHandler.html#method.about_to_waitI'm not entirely sure what the best option here is.