Update to winit 0.27. Handle new window events (IME and Occluded) #904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This pull request addresses issue #903 and updates the nannou and nannou_egui libraries to be compatible with winit version 0.27+.
One breaking change in winit 0.27 is the removal of the
WindowAttributes
field onWindowBuilder.
As a result, additional fields were added tonannou::window::Builder
to track properties such asinner_size
andmin_inner_size
before building the window.The winit update also introduces two new events: IME and Occluded.
Window::set_ime_allowed
is called. I ignored the event because the added complexity would outweigh the benefits, but I may be wrong.bool
which I believe indicates if the window is hidden or not (this is not documented in winit). This event can be useful to save computations when the window is not visible.Summary of changes: