Releases: rust-windowing/winit
Releases · rust-windowing/winit
Winit Version 0.29.1-beta
- 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.
Winit Version 0.29.0-beta.0
- On Web, allow event loops to be recreated with
spawn. - Breaking: Rename
Window::set_ime_positiontoWindow::set_ime_cursor_areaadding a way to set exclusive zone. - On Android, changed default behavior of Android to ignore volume keys letting the operating system handle them.
- On Android, added
EventLoopBuilderExtAndroid::handle_volume_keysto indicate that the application will handle the volume keys manually. - Breaking: Rename
DeviceEventFiltertoDeviceEventsreversing the behavior of variants. - Breaking: Rename
EventLoopWindowTarget::set_device_event_filtertolisten_device_events. - On X11, fix
EventLoopWindowTarget::listen_device_eventseffect being reversed. - Breaking: Remove all deprecated
modifiersfields. - Breaking: Overhaul keyboard input handling.
- Replace
KeyboardInputwithKeyEventandRawKeyEvent.- Change
WindowEvent::KeyboardInputto contain aKeyEvent. - Change
Event::Keyto contain aRawKeyEvent.
- Change
- Remove
Event::ReceivedCharacter. In its place, you should use
KeyEvent.textin combination withWindowEvent::Ime. - Replace
VirtualKeyCodewith theKeyenum. - Replace
ScanCodewith theKeyCodeenum. - Rename
ModifiersState::LOGOtoSUPERandModifiersState::CTRLtoCONTROL. - Add
KeyCodeto refer to keys (roughly) by their physical location. - Add
NativeKeyCodeto represent rawKeyCodes which Winit doesn't
understand. - Add
Keyto represent the keys after they've been interpreted by the
active (software) keyboard layout. - Add
NativeKeyto represent rawKeys which Winit doesn't understand. - Add
KeyLocationto tell apartKeys which usually "mean" the same thing,
but can appear simultaneously in different spots on the same keyboard
layout. - Add
Window::reset_dead_keysto enable application-controlled cancellation
of dead key sequences. - Add
KeyEventExtModifierSupplementto expose additional (and less
portable) interpretations of a given key-press. - Add
KeyCodeExtScancode, which lets you convert between raw keycodes and
KeyCode. ModifiersChangednow uses dedicatedModifiersstruct.
- Replace
- On Orbital, fix
ModifiersChangednot being sent. - Breaking:
CursorIconis now used from thecursor-iconcrate. - Breaking:
CursorIcon::Handis now namedCursorIcon::Pointer. - Breaking:
CursorIcon::Arrowwas removed. - On Wayland, fix maximized startup not taking full size on GNOME.
- On Wayland, fix initial window size not restored for maximized/fullscreened on startup window.
- On Wayland,
Window::outer_sizenow accounts for client side decorations. - On Wayland, fix window not checking that it actually got initial configure event.
- On Wayland, fix maximized window creation and window geometry handling.
- On Wayland, fix forward compatibility issues.
- On Wayland, add
Window::drag_resize_windowmethod. - On Wayland, drop
WINIT_WAYLAND_CSD_THEMEvariable. - Implement
PartialOrdandOrdon types in thedpimodule. - Breaking: Bump MSRV from
1.60to1.64. - Breaking: On Web, the canvas output bitmap size is no longer adjusted.
- On Web: fix
Window::request_redrawnot waking the event loop when called from outside the loop. - On Web: fix position of touch events to be relative to the canvas.
- On Web, fix
Window:::set_fullscreendoing nothing when called outside the event loop but during
a transient activation. - On Web, fix pointer button events not being processed when a buttons is already pressed.
- Breaking: Updated
bitflagscrate version to2, which changes the API on exposed types. - On Web, handle coalesced pointer events, which increases the resolution of pointer inputs.
- Breaking: On Web,
instantis now replaced byweb_time. - On Windows, port to
windows-sysversion 0.48.0. - On Web, fix pen treated as mouse input.
- On Web, send mouse position on button release as well.
- On Web, fix touch input not gaining or loosing focus.
- Breaking: On Web, dropped support for Safari versions below 13.1.
- On Web, prevent clicks on the canvas to select text.
- On Web,
EventLoopProxynow implementsSend. - On Web,
Windownow implementsSendandSync. - Breaking:
WindowExtWebSys::canvas()now returns anOption. - On Web, use the correct canvas size when calculating the new size during scale factor change,
instead of using the output bitmap size. - On Web, scale factor and dark mode detection are now more robust.
- On Web, fix the bfcache by not using the
beforeunloadevent and map bfcache loading/unloading toSuspended/Resumedevents. - On Web, fix scale factor resize suggestion always overwriting the canvas size.
- On macOS, fix crash when dropping
Window. - On Web, use
Window.requestIdleCallback()forControlFlow::Pollwhen available. - Breaking: On Web, the canvas size is not controlled by Winit anymore and external changes to
the canvas size will be reported throughWindowEvent::Resized. - On Web, respect
EventLoopWindowTarget::listen_device_events()settings. - On Web, fix
DeviceEvent::MouseMotiononly being emitted for each canvas instead of the whole window. - On Web, add
DeviceEvent::Motion,DeviceEvent::MouseWheel,DeviceEvent::Buttonand
DeviceEvent::Keysupport. - Breaking
MouseButtonnow supportsBackandForwardvariants, emitted from mouse events
on Wayland, X11, Windows, macOS and Web.
Winit Version v0.28.6
- On macOS, fixed memory leak when getting monitor handle.
- On macOS, fix
Backspacebeing emitted when clearing preedit with it.
Winit Version v0.28.5
- On macOS, fix
key_upbeing ignored whenImeis disabled.
Winit Version v0.28.4 [yanked]
- On macOS, fix empty marked text blocking regular input.
- On macOS, fix potential panic when getting refresh rate.
- On macOS, fix crash when calling
Window::set_ime_positionfrom another thread.
Winit Version v0.28.3
- Fix macOS memory leaks.
Winit Version v0.28.2
- Implement
HasRawDisplayHandleforEventLoop. - On macOS, set resize increments only for live resizes.
- On Wayland, fix rare crash on DPI change.
- On Web, add support for
Window::theme. - On Wayland, fix rounding issues when doing resize.
- On macOS, fix wrong focused state on startup.
- On Windows, fix crash on setting taskbar when using Visual Studio debugger.
- On macOS, resize simple fullscreen windows on windowDidChangeScreen events.
Winit Version v0.28.1
- On Wayland, fix crash when dropping a window in multi-window setup.
Winit Version v0.28.0
- On macOS, fixed
Ime::Commitpersisting for all input after interacting withIme. - On macOS, added
WindowExtMacOS::option_as_altandWindowExtMacOS::set_option_as_alt. - On Windows, fix window size for maximized, undecorated windows.
- On Windows and macOS, add
WindowBuilder::with_active. - Add
Window::is_minimized. - On X11, fix errors handled during
register_xlib_error_hookinvocation bleeding into winit. - Add
Window::has_focus. - On Windows, fix
Window::set_minimized(false)not working for windows minimized byWin + Dhotkey. - Breaking: On Web, touch input no longer fires
WindowEvent::Cursor*,WindowEvent::MouseInput, orDeviceEvent::MouseMotionlike other platforms, but instead it firesWindowEvent::Touch. - Breaking: Removed platform specific
WindowBuilder::with_parentAPI in favor ofWindowBuilder::with_parent_window. - On Windows, retain
WS_MAXIMIZEwindow style when un-minimizing a maximized window. - On Windows, fix left mouse button release event not being sent after
Window::drag_window. - On macOS, run most actions on the main thread, which is strictly more correct, but might make multithreaded applications block slightly more.
- On macOS, fix panic when getting current monitor without any monitor attached.
- On Windows and MacOS, add API to enable/disable window buttons (close, minimize, ...etc).
- On Windows, macOS, X11 and Wayland, add
Window::set_theme. - Breaking: Remove
WindowExtWayland::wayland_set_csd_themeandWindowBuilderExtX11::with_gtk_theme_variant. - On Windows, revert window background to an empty brush to avoid white flashes when changing scaling.
- Breaking: Removed
Window::set_always_on_topand related APIs in favor ofWindow::set_window_level. - On Windows, MacOS and X11, add always on bottom APIs.
- On Windows, fix the value in
MouseButton::Other. - On macOS, add
WindowExtMacOS::is_document_editedandWindowExtMacOS::set_document_editedAPIs. - Breaking: Removed
WindowBuilderExtIOS::with_root_view_class; instead, you should use[[view layer] addSublayer: ...]to add an instance of the desired layer class (e.g.CAEAGLLayerorCAMetalLayer). Seevulkano-winorwgpufor examples of this. - On MacOS and Windows, add
Window::set_content_protected. - On MacOS, add
EventLoopBuilderExtMacOS::with_activate_ignoring_other_apps. - On Windows, fix icons specified on
WindowBuildernot taking effect for windows created after the first one. - On Windows and macOS, add
Window::titleto query the current window title. - On Windows, fix focusing menubar when pressing
Alt. - On MacOS, made
accepts_first_mouseconfigurable. - Migrated
WindowBuilderExtUnix::with_resize_incrementstoWindowBuilder. - Added
Window::resize_increments/Window::set_resize_incrementsto update resize increments at runtime for X11/macOS. - macOS/iOS: Use
objc2instead ofobjcinternally. - Breaking: Bump MSRV from
1.57to1.60. - Breaking: Split the
platform::unixmodule intoplatform::x11andplatform::wayland. The extension types are similarly renamed. - Breaking:: Removed deprecated method
platform::unix::WindowExtUnix::is_ready. - Removed
parking_lotdependency. - Breaking: On macOS, add support for two-finger touchpad magnification and rotation gestures with new events
WindowEvent::TouchpadMagnifyandWindowEvent::TouchpadRotate. Also add support for touchpad smart-magnification gesture with a new eventWindowEvent::SmartMagnify. - Breaking: On web, the
WindowBuilderExtWebSys::with_prevent_defaultsetting (enabled by default), now additionally prevents scrolling of the webpage in mobile browsers, previously it only disabled scrolling on desktop. - On Wayland,
wayland-csd-adwaitanow usesab_glyphinstead ofcrossfontto render the title for decorations. - On Wayland, a new
wayland-csd-adwaita-crossfontfeature was added to usecrossfontinstead ofab_glyphfor decorations. - On Wayland, if not otherwise specified use upstream automatic CSD theme selection.
- On X11, added
WindowExtX11::with_parentto create child windows. - Added support for
WindowBuilder::with_themeandWindow::themeto support per-window dark/light/system theme configuration on macos, windows and wayland. - On macOS, added support for
WindowEvent::ThemeChanged. - Breaking: Removed
WindowBuilderExtWindows::with_themeandWindowBuilderExtWayland::with_wayland_csd_themein favour ofWindowBuilder::with_theme. - Breaking: Removed
WindowExtWindows::themein favour ofWindow::theme. - Enabled
doc_auto_cfgwhen generating docs on docs.rs for feature labels. - Breaking: On Android, switched to using
android-activitycrate as a glue layer instead ofndk-glue. See README.md#Android for more details. (#2444) - Breaking: Removed support for
raw-window-handleversion0.4 - On Wayland,
RedrawRequestednot emitted during resize. - Add a
set_wait_timeoutfunction toControlFlowto allow waiting for aDuration. - Breaking: Remove the unstable
xlib_xconnection()function from the private interface. - Added Orbital support for Redox OS
- On X11, added
drag_resize_windowmethod. - Added
Window::set_transparentto provide a hint about transparency of the window on Wayland and macOS. - On macOS, fix the mouse buttons other than left/right/middle being reported as middle.
- On Wayland, support fractional scaling via the wp-fractional-scale protocol.
- On web, fix removal of mouse event listeners from the global object upon window distruction.
- Add WindowAttributes getter to WindowBuilder to allow introspection of default values.
- Added
Window::set_ime_purposefor setting the IME purpose, currently implemented on Wayland only.
Winit Version v0.27.5
- On Wayland, fix byte offset in
Ime::Preeditpointing to invalid bytes.