Winit Version 0.29.1-beta
Pre-release
Pre-release
·
749 commits
to master
since this release
- Breaking: Bump
ndkversion to0.8.0-beta.0, ndk-sys tov0.5.0-beta.0,android-activityto0.5.0-beta.1. - Breaking: Bump MSRV from
1.64to1.65. - Make iOS windows usable from other threads.
- Reexport
raw-window-handleinwindowmodule. - Breaking:
WINIT_UNIX_BACKENDwas removed in favor of standardWAYLAND_DISPLAYandDISPLAYvariables. - Breaking:
EventLoop::newandEventLoopBuilder::buildnow returnResult<Self, EventLoopError> - On X11, set
visual_idin returnedraw-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-handletrait 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 throttleRedrawRequestedevents. - On Wayland, use frame callbacks to throttle
RedrawRequestedevents so redraws will align with compositor. - Add
Window::pre_present_notifyto notify winit before presenting to the windowing system. - On Windows, added
WindowBuilderExtWindows::with_class_nameto customize the internal class name. - Breaking: Remove lifetime parameter from
EventandWindowEvent. - Breaking:
ScaleFactorChangednow contains a writer instead of a reference to update inner size. - On iOS, always wake the event loop when transitioning from
ControlFlow::PolltoControlFlow::Poll. - Breaking:
ActivationTokenDoneevent which could be requested with the newstartup_notifymodule, see its docs for more. - On Wayland, make double clicking and moving the CSD frame more reliable.
- On macOS, add tabbing APIs on
WindowExtMacOSandEventLoopWindowTargetExtMacOS. - Breaking: Rename
Window::set_inner_sizetoWindow::request_inner_sizeand 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
PartialOrdandOrdforKey,KeyCode,NativeKey, andNativeKeyCode. - 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, andmarginwhen 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
Windowmethods using incorrect HTML attributes instead of CSS properties. - On Web, fix some
WindowBuildermethods doing nothing. - On Web, implement
Window::focus_window(). - On Web, remove unnecessary
Window::is_dark_mode(), which was replaced withWindow::theme(). - On Web, add
WindowBuilderExtWebSys::with_append()to append the canvas element to the web page on creation. - On Windows, add
drag_resize_windowmethod support. - Breaking
run() ->!has been replaced byrun() -> Result<(), EventLoopError>for returning errors without callingstd::process::exit()(#2767) - Breaking Removed
EventLoopExtRunReturn/run_returnin favor ofEventLoopExtPumpEvents/pump_eventsandEventLoopExtRunOnDemand/run_ondemand(#2767) RedrawRequestedis no longer guaranteed to be emitted afterMainEventsCleared, it is now platform-specific when the event is emitted after being requested viaredraw_request().- On Windows,
RedrawRequestedis now driven byWM_PAINTmessages which are requested viaredraw_request()
- On Windows,
- Breaking
LoopDestroyedrenamed toLoopExiting(#2900) - Breaking
RedrawEventsClearedremoved (#2900) - Breaking
MainEventsClearedremoved (#2900) - Added
AboutToWaitevent which is emitted when the event loop is about to block and wait for new events (#2900) - Breaking:
with_x11_visualnow takes the visual ID instead of the bare pointer. - On X11, add a
with_embedded_parent_windowfunction 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.