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

Update to winit 0.27. Handle new window events (IME and Occluded) #904

Closed
wants to merge 5 commits into from

Commits on Jan 22, 2023

  1. Bump winit to 0.27. Fix private access to window.

    The commit updates nannou and nannou_egui to use winit to 0.27+. The
    window attribute of the WindowBuilder is now private, we use the
    WindowBuilder methods to properly build the window in window.rs.
    
    Because the properties of the `Window` currently being built cannot be
    accessed from the `WindowBuilder` anymore, some additional properties
    have to be stored in the `Builder` struct which are mirrors of the
    `Window`'s properties. These properties allow checking if a value and
    what it was set to. `Builder` now has `fullscreen` `size`, `min_size`,
    and `max_size` as new properties.
    
    The `set_cursor_grab` has also been updated with the new winit enum
    `CursorGrabMode`. If the cursor should be grabbed, we first try to
    confine it, then try to lock it (see
    https://docs.rs/winit/latest/winit/window/enum.CursorGrabMode.html).
    hugcis committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    247718f View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2023

  1. Handle new events from winit 0.27.

    The Ime event corresponds to a "composition event". It will never be
    sent if `Window::set_ime_allowed` is not called. These events are
    stateful, they first need to be enabled and successive events need to be
    combined. This should be a separate feature since it will require some
    extra work to handle.
    
    The occluded event is handled a function can be used to take advantage
    of it. For example, costly rendering can be avoided if the window is
    occluded (hidden from view).
    hugcis committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    9bfb08f View commit details
    Browse the repository at this point in the history
  2. Update changelog

    hugcis committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    59bc8c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    394c65e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5914c59 View commit details
    Browse the repository at this point in the history