5.5 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Breaking Changes
-
Window::set_inner_sizehas been replaced withWindow::request_inner_size, and it matches the semantics of winit's underlyingrequest_inner_size. The function returns an option containing the new size if the size was able to be applied before the function returns.This new function properly updates the
inner_sizeandouter_sizewhen the underlying window is resized immediately. Notably, this happens on Wayland but may happen on some other platforms as well. -
RunningWindow::winitnow returns anArcwrapped winit window. -
AppMessage::Erroris a new associated type that is used to communicate errors from window threads to the event loop. To facilitate this communication,App::send_errorandApplication::send_errorhave been added.Additionally,
WindowBehavior::Initializenow returns aResult<Self, AppMessage::Error>.To install a hander, use
PendingApp::on_error.
Added
- A new feature
xdghas been added, enabled by default, that enables detecting dark mode changes on Linux.
v0.4.0 (2024-09-14)
Breaking Changes
-
Several functions now accept an
ExecutingAppparameter instead of aWindowsparameter. This new type exposes access to other information from the event loop such as monitor information. The affected APIs are:PendingApp::new_with_event_callbackWindowBehavior::run_with_event_callbackWindowBehavior::run_with_context_and_event_callback
-
RunningWindow::positionhas been split intoRunningWindow::inner_positionandRunningWindow::outer_position.RunningWindow::set_positionhas been renamed toRunningWindow::set_outer_position.
Fixed
Window'sCloneimplementation no longer requires its generic parameter to implementClone.WindowAttributes::activeis now honored when usingdelay_visible.
Added
PendingApp::on_startupaccepts a callback that will be invoked once the event loop is executing.WindowBehavior::movedis called when the window moves.RunningWindow::outer_sizeis a new function that returns the window's current size including decorations.App::prevent_shutdown()returns a guard that prevents the application from closing automatically when the final window is closed.WindowBehavior::initializedis called once when the window has been fully initialized. This happens after thedelay_visiblelogic has been executed.
Changed
AsApplicationis now explicitly implemented forAppandPendingApprather than implemented using a blanket implementation. This allows downstream crates to create wrappers of these types that can implementAsApplication.
v0.3.2 (2024-08-28)
Fixed
- When multiple windows are open, windows now properly close fully without requiring that all windows are closed.
v0.3.1 (2024-07-15)
Added
WindowAttributes::delay_visibleis a new setting initializes the windowvisible: falsebefore showing it after the first successful redraw. The goal is to avoid the OS drawing an empty window before the window behavior has initialized. This new attribute defaults to true.
v0.3.0 (2024-05-12)
Breaking Changes
- This crate no longer specifies a specific raw-window-handle flag for winit.
This crate will maintain feature flags that allow picking whatever versions
winit is exposing. As of writing this note, the choices are
rwh_05andrwh_06.rwh_05was the feature that was activated in v0.2.0. winithas been updated to 0.30.0.Window::idnow returnsOption<WindowId>, as a window may be opened before the event loop has been started.WindowBehavior::build,WindowBehavior::build_with,WindowBehavior::open, andWindowBehavior::open_withnow require exclusive references to the application.- These gesture events have been renamed to match
winit's updated nomenclature:WindowBehavior::touchpad_magnify->WindowBehavior::pinch_gestureWindowBehavior::smart_magnify->WindowBehavior::double_tap_gesture
Changed
- All
&Appplicationbounds now are?Sized, enabling&dyn Applicationparameters. - Redraw requests from
winitnow block the event loop thread until the window has been repainted.
Added
AsApplicationnow providesas_application_mut.WindowBeahvior::pan_gestureis a new event provided bywinit.
v0.2.0 (2023-12-27)
Breaking Changes
UnwindSafeis no longer required forWindowBehaviororWindowBehavior::Context.
Changed
- This crate's default features now include
wayland-csd-adwaita. This enables winit's built-in decoration drawing on Wayland.
Fixed
Appnow implementsApplication.Windowis now fully weak. Previously the channel for messages would still remain allocated while instances ofWindowexisted. Now, the messages channel is freed as soon as the window is closed.
Added
AsApplicationis a new trait that can be implemented to resolve to theApptype. This allows wrapper types to be written that hide the appit types.WindowAttributesnow implementDebug.
v0.1.1 (2023-12-18)
Fixed
- Errors when building for Windows have been resolved.
v0.1.0 (2023-12-18)
This is the initial alpha release.