Skip to content

Winit Version 0.29.1-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@kchibisov kchibisov released this 16 Aug 08:43
· 574 commits to master since this release
v0.29.1-beta
7f1aaa6
  • Breaking: Bump ndk version to 0.8.0-beta.0, ndk-sys to v0.5.0-beta.0, android-activity to 0.5.0-beta.1.
  • Breaking: Bump MSRV from 1.64 to 1.65.
  • Make iOS windows usable from other threads.
  • Reexport raw-window-handle in window module.
  • Breaking: WINIT_UNIX_BACKEND was removed in favor of standard WAYLAND_DISPLAY and DISPLAY variables.
  • Breaking: EventLoop::new and EventLoopBuilder::build now return Result<Self, EventLoopError>
  • On X11, set visual_id in returned raw-window-handle.
  • Breaking: on Wayland, dispatching user created wayland queue won't wake up the loop unless winit has event to send back.
  • Removed platform-specific extensions that should be retrieved through raw-window-handle trait implementations instead:
    • platform::windows::HINSTANCE.
    • WindowExtWindows::hinstance.
    • WindowExtWindows::hwnd.
    • WindowExtIOS::ui_window.
    • WindowExtIOS::ui_view_controller.
    • WindowExtIOS::ui_view.
    • WindowExtMacOS::ns_window.
    • WindowExtMacOS::ns_view.
    • EventLoopWindowTargetExtWayland::wayland_display.
    • WindowExtWayland::wayland_surface.
    • WindowExtWayland::wayland_display.
    • WindowExtX11::xlib_window.
    • WindowExtX11::xlib_display.
    • WindowExtX11::xlib_screen_id.
    • WindowExtX11::xcb_connection.
  • On Web, use Window.requestAnimationFrame() to throttle RedrawRequested events.
  • On Wayland, use frame callbacks to throttle RedrawRequested events so redraws will align with compositor.
  • Add Window::pre_present_notify to notify winit before presenting to the windowing system.
  • On Windows, added WindowBuilderExtWindows::with_class_name to customize the internal class name.
  • Breaking: Remove lifetime parameter from Event and WindowEvent.
  • Breaking: ScaleFactorChanged now contains a writer instead of a reference to update inner size.
  • On iOS, always wake the event loop when transitioning from ControlFlow::Poll to ControlFlow::Poll.
  • Breaking: ActivationTokenDone event which could be requested with the new startup_notify module, see its docs for more.
  • On Wayland, make double clicking and moving the CSD frame more reliable.
  • On macOS, add tabbing APIs on WindowExtMacOS and EventLoopWindowTargetExtMacOS.
  • Breaking: Rename Window::set_inner_size to Window::request_inner_size and indicate if the size was applied immediately.
  • On X11, fix false positive flagging of key repeats when pressing different keys with no release between presses.
  • Implement PartialOrd and Ord for Key, KeyCode, NativeKey, and NativeKeyCode.
  • Add ElementState::is_pressed.
  • On Web, implement WindowEvent::Occluded.
  • On Web, fix touch location to be as accurate as mouse position.
  • On Web, account for CSS padding, border, and margin when getting or setting the canvas position.
  • On Web, add Fullscreen API compatibility for Safari.
  • On Web, implement Window::set_(min|max)_inner_size().
  • On Web, fix some Window methods using incorrect HTML attributes instead of CSS properties.
  • On Web, fix some WindowBuilder methods doing nothing.
  • On Web, implement Window::focus_window().
  • On Web, remove unnecessary Window::is_dark_mode(), which was replaced with Window::theme().
  • On Web, add WindowBuilderExtWebSys::with_append() to append the canvas element to the web page on creation.
  • On Windows, add drag_resize_window method support.
  • Breaking run() ->! has been replaced by run() -> Result<(), EventLoopError> for returning errors without calling std::process::exit() (#2767)
  • Breaking Removed EventLoopExtRunReturn / run_return in favor of EventLoopExtPumpEvents / pump_events and EventLoopExtRunOnDemand / run_ondemand (#2767)
  • RedrawRequested is no longer guaranteed to be emitted after MainEventsCleared, it is now platform-specific when the event is emitted after being requested via redraw_request().
    • On Windows, RedrawRequested is now driven by WM_PAINT messages which are requested via redraw_request()
  • Breaking LoopDestroyed renamed to LoopExiting (#2900)
  • Breaking RedrawEventsCleared removed (#2900)
  • Breaking MainEventsCleared removed (#2900)
  • Added AboutToWait event which is emitted when the event loop is about to block and wait for new events (#2900)
  • Breaking: with_x11_visual now takes the visual ID instead of the bare pointer.
  • On X11, add a with_embedded_parent_window function to the window builder to allow embedding a window into another window.
  • On iOS, add force data to touch events when using the Apple Pencil.