Winit Version 0.29.1-beta
Pre-release
Pre-release
kchibisov
released this
16 Aug 08:43
·
574 commits
to master
since this release
- Breaking: Bump
ndk
version to0.8.0-beta.0
, ndk-sys tov0.5.0-beta.0
,android-activity
to0.5.0-beta.1
. - Breaking: Bump MSRV from
1.64
to1.65
. - Make iOS windows usable from other threads.
- Reexport
raw-window-handle
inwindow
module. - Breaking:
WINIT_UNIX_BACKEND
was removed in favor of standardWAYLAND_DISPLAY
andDISPLAY
variables. - Breaking:
EventLoop::new
andEventLoopBuilder::build
now returnResult<Self, EventLoopError>
- On X11, set
visual_id
in 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-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 throttleRedrawRequested
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
andWindowEvent
. - 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
toControlFlow::Poll
. - Breaking:
ActivationTokenDone
event which could be requested with the newstartup_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
andEventLoopWindowTargetExtMacOS
. - Breaking: Rename
Window::set_inner_size
toWindow::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
andOrd
forKey
,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
, andmargin
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 withWindow::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 byrun() -> Result<(), EventLoopError>
for returning errors without callingstd::process::exit()
(#2767) - Breaking Removed
EventLoopExtRunReturn
/run_return
in favor ofEventLoopExtPumpEvents
/pump_events
andEventLoopExtRunOnDemand
/run_ondemand
(#2767) RedrawRequested
is no longer guaranteed to be emitted afterMainEventsCleared
, it is now platform-specific when the event is emitted after being requested viaredraw_request()
.- On Windows,
RedrawRequested
is now driven byWM_PAINT
messages which are requested viaredraw_request()
- On Windows,
- Breaking
LoopDestroyed
renamed toLoopExiting
(#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.