SakulFlee / Akimo-Project

Other
0 stars 0 forks source link

Update Rust crate winit to 0.30 #189

Open renovate[bot] opened 2 weeks ago

renovate[bot] commented 2 weeks ago

Mend Renovate

This PR contains the following updates:

Package Type Update Change
winit dependencies minor 0.28 -> 0.30

Release Notes

rust-windowing/winit (winit) ### [`v0.30.3`](https://togithub.com/rust-windowing/winit/releases/tag/v0.30.3): Winit version 0.30.3 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.30.2...v0.30.3) ##### Added - On Web, add `EventLoopExtWebSys::(set_)poll_strategy()` to allow setting control flow strategies before starting the event loop. - On Web, add `WaitUntilStrategy`, which allows to set different strategies for `ControlFlow::WaitUntil`. By default the Prioritized Task Scheduling API is used, with a fallback to `setTimeout()` with a trick to circumvent throttling to 4ms. But an option to use a Web worker to schedule the timer is available as well, which commonly prevents any throttling when the window is not focused. ##### Changed - On macOS, set the window theme on the `NSWindow` instead of application-wide. ##### Fixed - On X11, build on arm platforms. - On macOS, fixed `WindowBuilder::with_theme` not having any effect on the window. ### [`v0.30.2`](https://togithub.com/rust-windowing/winit/releases/tag/v0.30.2): Winit version 0.30.2 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.30.1...v0.30.2) ##### Fixed - On Web, fix `EventLoopProxy::send_event()` triggering event loop immediately when not called from inside the event loop. Now queues a microtask instead. - On Web, stop overwriting default cursor with `CursorIcon::Default`. - On Web, prevent crash when using `InnerSizeWriter::request_inner_size()`. - On macOS, fix not working opacity for entire window. ### [`v0.30.1`](https://togithub.com/rust-windowing/winit/releases/tag/v0.30.1): Winit version 0.30.1 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.30.0...v0.30.1) ##### Added - Reexport `raw-window-handle` versions 0.4 and 0.5 as `raw_window_handle_04` and `raw_window_handle_05`. - Implement `ApplicationHandler` for `&mut` references and heap allocations to something that implements `ApplicationHandler`. - Add traits `EventLoopExtWayland` and `EventLoopExtX11`, providing methods `is_wayland` and `is_x11` on `EventLoop`. ##### Fixed - On macOS, fix panic on exit when dropping windows outside the event loop. - On macOS, fix window dragging glitches when dragging across a monitor boundary with different scale factor. - On macOS, fix the range in `Ime::Preedit`. - On macOS, use the system's internal mechanisms for queuing events. - On macOS, handle events directly instead of queuing when possible. ### [`v0.30.0`](https://togithub.com/rust-windowing/winit/releases/tag/v0.30.0): Winit version 0.30.0 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.15...v0.30.0) ##### Added - Add `OwnedDisplayHandle` type for allowing safe display handle usage outside of trivial cases. - Add `ApplicationHandler` trait which mimics `Event`. - Add `WindowBuilder::with_cursor` and `Window::set_cursor` which takes a `CursorIcon` or `CustomCursor`. - Add `Sync` implementation for `EventLoopProxy`. - Add `Window::default_attributes` to get default `WindowAttributes`. - Add `EventLoop::builder` to get `EventLoopBuilder` without export. - Add `CustomCursor::from_rgba` to allow creating cursor images from RGBA data. - Add `CustomCursorExtWebSys::from_url` to allow loading cursor images from URLs. - Add `CustomCursorExtWebSys::from_animation` to allow creating animated cursors from other `CustomCursor`s. - Add `{Active,}EventLoop::create_custom_cursor` to load custom cursor image sources. - Add `ActiveEventLoop::create_window` and `EventLoop::create_window`. - Add `CustomCursor` which could be set via `Window::set_cursor`, implemented on Windows, macOS, X11, Wayland, and Web. - On Web, add to toggle calling `Event.preventDefault()` on `Window`. - On iOS, add `PinchGesture`, `DoubleTapGesture`, `PanGesture` and `RotationGesture`. - on iOS, use `UIGestureRecognizerDelegate` for fine grained control of gesture recognizers. - On macOS, add services menu. - On Windows, add `with_title_text_color`, and `with_corner_preference` on `WindowAttributesExtWindows`. - On Windows, implement resize increments. - On Windows, add `AnyThread` API to access window handle off the main thread. ##### Changed - Bump MSRV from `1.65` to `1.70`. - On Wayland, bump `sctk-adwaita` to `0.9.0`, which changed system library crates. This change is a **cascading breaking change**, you must do breaking change as well, even if you don't expose winit. - Rename `TouchpadMagnify` to `PinchGesture`. - Rename `SmartMagnify` to `DoubleTapGesture`. - Rename `TouchpadRotate` to `RotationGesture`. - Rename `EventLoopWindowTarget` to `ActiveEventLoop`. - Rename `platform::x11::XWindowType` to `platform::x11::WindowType`. - Rename `VideoMode` to `VideoModeHandle` to represent that it doesn't hold static data. - Make `Debug` formatting of `WindowId` more concise. - Move `dpi` types to its own crate, and re-export it from the root crate. - Replace `log` with `tracing`, use `log` feature on `tracing` to restore old behavior. - `EventLoop::with_user_event` now returns `EventLoopBuilder`. - On Web, return `HandleError::Unavailable` when a window handle is not available. - On Web, return `RawWindowHandle::WebCanvas` instead of `RawWindowHandle::Web`. - On Web, remove queuing fullscreen request in absence of transient activation. - On iOS, return `HandleError::Unavailable` when a window handle is not available. - On macOS, return `HandleError::Unavailable` when a window handle is not available. - On Windows, remove `WS_CAPTION`, `WS_BORDER`, and `WS_EX_WINDOWEDGE` styles for child windows without decorations. - On Android, bump `ndk` to `0.9.0` and `android-activity` to `0.6.0`, and remove unused direct dependency on `ndk-sys`. ##### Deprecated - Deprecate `EventLoop::run`, use `EventLoop::run_app`. - Deprecate `EventLoopExtRunOnDemand::run_on_demand`, use `EventLoop::run_app_on_demand`. - Deprecate `EventLoopExtPumpEvents::pump_events`, use `EventLoopExtPumpEvents::pump_app_events`. The new `app` APIs accept a newly added `ApplicationHandler` instead of `Fn`. The semantics are mostly the same, given that the capture list of the closure is your new `State`. Consider the following code: ```rust,no_run use winit::event::Event; use winit::event_loop::EventLoop; use winit::window::Window; struct MyUserEvent; let event_loop = EventLoop::::with_user_event().build().unwrap(); let window = event_loop.create_window(Window::default_attributes()).unwrap(); let mut counter = 0; let _ = event_loop.run(move |event, event_loop| { match event { Event::AboutToWait => { window.request_redraw(); counter += 1; } Event::WindowEvent { window_id, event } => { // Handle window event. } Event::UserEvent(event) => { // Handle user event. } Event::DeviceEvent { device_id, event } => { // Handle device event. } _ => (), } }); ``` To migrate this code, you should move all the captured values into some newtype `State` and implement `ApplicationHandler` for this type. Finally, we move particular `match event` arms into methods on `ApplicationHandler`, for example: ```rust,no_run use winit::application::ApplicationHandler; use winit::event::{Event, WindowEvent, DeviceEvent, DeviceId}; use winit::event_loop::{EventLoop, ActiveEventLoop}; use winit::window::{Window, WindowId}; struct MyUserEvent; struct State { window: Window, counter: i32, } impl ApplicationHandler for State { fn user_event(&mut self, event_loop: &ActiveEventLoop, user_event: MyUserEvent) { // Handle user event. } fn resumed(&mut self, event_loop: &ActiveEventLoop) { // Your application got resumed. } fn window_event(&mut self, event_loop: &ActiveEventLoop, window_id: WindowId, event: WindowEvent) { // Handle window event. } fn device_event(&mut self, event_loop: &ActiveEventLoop, device_id: DeviceId, event: DeviceEvent) { // Handle device event. } fn about_to_wait(&mut self, event_loop: &ActiveEventLoop) { self.window.request_redraw(); self.counter += 1; } } let event_loop = EventLoop::::with_user_event().build().unwrap(); #[allow(deprecated)] let window = event_loop.create_window(Window::default_attributes()).unwrap(); let mut state = State { window, counter: 0 }; let _ = event_loop.run_app(&mut state); ``` Please submit your feedback after migrating in [this issue](https://togithub.com/rust-windowing/winit/issues/3626). - Deprecate `Window::set_cursor_icon`, use `Window::set_cursor`. ##### Removed - Remove `Window::new`, use `ActiveEventLoop::create_window` instead. You now have to create your windows inside the actively running event loop (usually the `new_events(cause: StartCause::Init)` or `resumed()` events), and can no longer do it before the application has properly launched. This change is done to fix many long-standing issues on iOS and macOS, and will improve things on Wayland once fully implemented. To ease migration, we provide the deprecated `EventLoop::create_window` that will allow you to bypass this restriction in this release. Using the migration example from above, you can change your code as follows: ```rust,no_run use winit::application::ApplicationHandler; use winit::event::{Event, WindowEvent, DeviceEvent, DeviceId}; use winit::event_loop::{EventLoop, ActiveEventLoop}; use winit::window::{Window, WindowId}; #[derive(Default)] struct State { // Use an `Option` to allow the window to not be available until the // application is properly running. window: Option, counter: i32, } impl ApplicationHandler for State { // This is a common indicator that you can create a window. fn resumed(&mut self, event_loop: &ActiveEventLoop) { self.window = Some(event_loop.create_window(Window::default_attributes()).unwrap()); } fn window_event(&mut self, event_loop: &ActiveEventLoop, window_id: WindowId, event: WindowEvent) { // `unwrap` is fine, the window will always be available when // receiving a window event. let window = self.window.as_ref().unwrap(); // Handle window event. } fn device_event(&mut self, event_loop: &ActiveEventLoop, device_id: DeviceId, event: DeviceEvent) { // Handle window event. } fn about_to_wait(&mut self, event_loop: &ActiveEventLoop) { if let Some(window) = self.window.as_ref() { window.request_redraw(); self.counter += 1; } } } let event_loop = EventLoop::new().unwrap(); let mut state = State::default(); let _ = event_loop.run_app(&mut state); ``` - Remove `Deref` implementation for `EventLoop` that gave `EventLoopWindowTarget`. - Remove `WindowBuilder` in favor of `WindowAttributes`. - Remove Generic parameter `T` from `ActiveEventLoop`. - Remove `EventLoopBuilder::with_user_event`, use `EventLoop::with_user_event`. - Remove Redundant `EventLoopError::AlreadyRunning`. - Remove `WindowAttributes::fullscreen` and expose as field directly. - On X11, remove `platform::x11::XNotSupported` export. ##### Fixed - On Web, fix setting cursor icon overriding cursor visibility. - On Windows, fix cursor not confined to center of window when grabbed and hidden. - On macOS, fix sequence of mouse events being out of order when dragging on the trackpad. - On Wayland, fix decoration glitch on close with some compositors. - On Android, fix a regression introduced in [#​2748](https://togithub.com/rust-windowing/winit/issues/2748) to allow volume key events to be received again. - On Windows, don't return a valid window handle outside of the GUI thread. - On macOS, don't set the background color when initializing a window with transparency. ### [`v0.29.15`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.15): Winit version 0.29.15 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.14...v0.29.15) - On X11, fix crash due to xsettings query on systems with incomplete xsettings. ### [`v0.29.14`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.14): Winit version 0.29.14 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.13...v0.29.14) - On X11/Wayland, fix `text` and `text_with_all_modifiers` not being `None` during compose. - On Wayland, don't reapply cursor grab when unchanged. - On X11, fix a bug where some mouse events would be unexpectedly filtered out. ### [`v0.29.13`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.13): Winit version 0.29.13 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.12...v0.29.13) - On Web, fix possible crash with `ControlFlow::Wait` and `ControlFlow::WaitUntil`. ### [`v0.29.12`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.12): Winit version 0.29.12 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.11...v0.29.12) - On X11, fix use after free during xinput2 handling. - On X11, filter close to zero values in mouse device events ### [`v0.29.11`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.11): Winit version 0.29.11 [yanked] [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.10...v0.29.11) - On Wayland, fix DeviceEvent::Motion not being sent - On X11, don't require XIM to run. - On X11, fix xkb state not being updated correctly sometimes leading to wrong input. - Fix compatibility with 32-bit platforms without 64-bit atomics. - On macOS, fix incorrect IME cursor rect origin. - On X11, fix swapped instance and general class names. - On Windows, fixed a race condition when sending an event through the loop proxy. - On Wayland, disable `Occluded` event handling. - On X11, reload dpi on `_XSETTINGS_SETTINGS` update. - On X11, fix deadlock when adjusting DPI and resizing at the same time. - On Wayland, fix `Focused(false)` being send when other seats still have window focused. - On Wayland, fix `Window::set_{min,max}_inner_size` not always applied. - On Windows, fix inconsistent resizing behavior with multi-monitor setups when repositioning outside the event loop. - On Wayland, fix `WAYLAND_SOCKET` not used when detecting platform. - On Orbital, fix `logical_key` and `text` not reported in `KeyEvent`. - On Orbital, implement `KeyEventExtModifierSupplement`. - On Orbital, map keys to `NamedKey` when possible. - On Orbital, implement `set_cursor_grab`. - On Orbital, implement `set_cursor_visible`. - On Orbital, implement `drag_window`. - On Orbital, implement `drag_resize_window`. - On Orbital, implement `set_transparent`. - On Orbital, implement `set_visible`. - On Orbital, implement `is_visible`. - On Orbital, implement `set_resizable`. - On Orbital, implement `is_resizable`. - On Orbital, implement `set_maximized`. - On Orbital, implement `is_maximized`. - On Orbital, implement `set_decorations`. - On Orbital, implement `is_decorated`. - On Orbital, implement `set_window_level`. - On Orbital, emit `DeviceEvent::MouseMotion`. - On Wayland, fix title in CSD not updated from `AboutToWait`. ### [`v0.29.10`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.10): Winit version 0.29.10 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.9...v0.29.10) - On Web, account for canvas being focused already before event loop starts. - On Web, increase cursor position accuracy. ### [`v0.29.9`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.9): Winit version 0.29.9 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.8...v0.29.9) - On X11, fix `NotSupported` error not propagated when creating event loop. - On Wayland, fix resize not issued when scale changes - On X11 and Wayland, fix arrow up on keypad reported as `ArrowLeft`. - On macOS, report correct logical key when Ctrl or Cmd is pressed. ### [`v0.29.8`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.8): Winit version 0.29.8 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.7...v0.29.8) - On X11, fix IME input lagging behind. - On X11, fix `ModifiersChanged` not sent from xdotool-like input - On X11, fix keymap not updated from xmodmap. - On X11, reduce the amount of time spent fetching screen resources. - On Wayland, fix `Window::request_inner_size` being overwritten by resize. - On Wayland, fix `Window::inner_size` not using the correct rounding. ### [`v0.29.7`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.7): Winit version 0.29.7 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.6...v0.29.7) - On X11, fix `Xft.dpi` reload during runtime. - On X11, fix window minimize. ### [`v0.29.6`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.6): Winit version 0.29.6 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.5...v0.29.6) - On Web, fix context menu not being disabled by `with_prevent_default(true)`. - On Wayland, fix `WindowEvent::Destroyed` not being delivered after destroying window. - Fix `EventLoopExtRunOnDemand::run_on_demand` not working for consequent invocation ### [`v0.29.5`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.5): Winit version 0.29.5 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.4...v0.29.5) - On macOS, remove spurious error logging when handling `Fn`. - On X11, fix an issue where floating point data from the server is misinterpreted during a drag and drop operation. - On X11, fix a bug where focusing the window would panic. - On macOS, fix `refresh_rate_millihertz`. - On Wayland, disable Client Side Decorations when `wl_subcompositor` is not supported. - On X11, fix `Xft.dpi` detection from Xresources. - On Windows, fix consecutive calls to `window.set_fullscreen(Some(Fullscreen::Borderless(None)))` resulting in losing previous window state when eventually exiting fullscreen using `window.set_fullscreen(None)`. - On Wayland, fix resize being sent on focus change. - On Windows, fix `set_ime_cursor_area`. ### [`v0.29.4`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.4): Winit Version 0.29.4 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.3...v0.29.4) - Fix crash when running iOS app on macOS. - On X11, check common alternative cursor names when loading cursor. - On X11, reload the DPI after a property change event. - On Windows, fix so `drag_window` and `drag_resize_window` can be called from another thread. - On Windows, fix `set_control_flow` in `AboutToWait` not being taken in account. - On macOS, send a `Resized` event after each `ScaleFactorChanged` event. - On Wayland, fix `wl_surface` being destroyed before associated objects. - On macOS, fix assertion when pressing `Fn` key. ### [`v0.29.3`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.3): Winit Version 0.29.3 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.29.2...v0.29.3) - On Wayland, apply correct scale to `PhysicalSize` passed in `WindowBuilder::with_inner_size` when possible. - On Wayland, fix `RedrawRequsted` being always sent without decorations and `sctk-adwaita` feature. - On Wayland, ignore resize requests when the window is fully tiled. - On Wayland, use `configure_bounds` to constrain `with_inner_size` when compositor wants users to pick size. - On Windows, fix deadlock when accessing the state during `Cursor{Enter,Leave}`. - On Windows, add support for `Window::set_transparent`. - On macOS, fix deadlock when entering a nested event loop from an event handler. - On macOS, add support for `Window::set_blur`. ### [`v0.29.2`](https://togithub.com/rust-windowing/winit/releases/tag/v0.29.2): Winit Version 0.29.2 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.28.7...v0.29.2) - **Breaking:** Bump MSRV from `1.60` to `1.65`. - **Breaking:** Add `Event::MemoryWarning`; implemented on iOS/Android. - **Breaking:** Bump `ndk` version to `0.8.0`, ndk-sys to `0.5.0`, `android-activity` to `0.5.0`. - **Breaking:** Change default `ControlFlow` from `Poll` to `Wait`. - **Breaking:** Move `Event::RedrawRequested` to `WindowEvent::RedrawRequested`. - **Breaking:** Moved `ControlFlow::Exit` to `EventLoopWindowTarget::exit()` and `EventLoopWindowTarget::exiting()` and removed `ControlFlow::ExitWithCode(_)` entirely. - **Breaking:** Moved `ControlFlow` to `EventLoopWindowTarget::set_control_flow()` and `EventLoopWindowTarget::control_flow()`. - **Breaking:** `EventLoop::new` and `EventLoopBuilder::build` now return `Result` - **Breaking:** `WINIT_UNIX_BACKEND` was removed in favor of standard `WAYLAND_DISPLAY` and `DISPLAY` variables. - **Breaking:** on Wayland, dispatching user created Wayland queue won't wake up the loop unless winit has event to send back. - **Breaking:** remove `DeviceEvent::Text`. - **Breaking:** Remove lifetime parameter from `Event` and `WindowEvent`. - **Breaking:** Rename `Window::set_inner_size` to `Window::request_inner_size` and indicate if the size was applied immediately. - **Breaking:** `ActivationTokenDone` event which could be requested with the new `startup_notify` module, see its docs for more. - **Breaking:** `ScaleFactorChanged` now contains a writer instead of a reference to update inner size. - **Breaking** `run() -> !` has been replaced by `run() -> Result<(), EventLoopError>` for returning errors without calling `std::process::exit()` ([#​2767](https://togithub.com/rust-windowing/winit/pull/2767)) - **Breaking** Removed `EventLoopExtRunReturn` / `run_return` in favor of `EventLoopExtPumpEvents` / `pump_events` and `EventLoopExtRunOnDemand` / `run_on_demand` ([#​2767](https://togithub.com/rust-windowing/winit/pull/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](https://togithub.com/rust-windowing/winit/issues/2900)) - **Breaking** `RedrawEventsCleared` removed ([#​2900](https://togithub.com/rust-windowing/winit/issues/2900)) - **Breaking** `MainEventsCleared` removed ([#​2900](https://togithub.com/rust-windowing/winit/issues/2900)) - **Breaking:** Remove all deprecated `modifiers` fields. - **Breaking:** Rename `DeviceEventFilter` to `DeviceEvents` reversing the behavior of variants. - **Breaking** Add `AboutToWait` event which is emitted when the event loop is about to block and wait for new events ([#​2900](https://togithub.com/rust-windowing/winit/issues/2900)) - **Breaking:** Rename `EventLoopWindowTarget::set_device_event_filter` to `listen_device_events`. - **Breaking:** Rename `Window::set_ime_position` to `Window::set_ime_cursor_area` adding a way to set exclusive zone. - **Breaking:** `with_x11_visual` now takes the visual ID instead of the bare pointer. - **Breaking** `MouseButton` now supports `Back` and `Forward` variants, emitted from mouse events on Wayland, X11, Windows, macOS and Web. - **Breaking:** On Web, `instant` is now replaced by `web_time`. - **Breaking:** On Web, dropped support for Safari versions below 13.1. - **Breaking:** On Web, the canvas output bitmap size is no longer adjusted. - **Breaking:** On Web, the canvas size is not controlled by Winit anymore and external changes to the canvas size will be reported through `WindowEvent::Resized`. - **Breaking:** Updated `bitflags` crate version to `2`, which changes the API on exposed types. - **Breaking:** `CursorIcon::Arrow` was removed. - **Breaking:** `CursorIcon::Hand` is now named `CursorIcon::Pointer`. - **Breaking:** `CursorIcon` is now used from the `cursor-icon` crate. - **Breaking:** `WindowExtWebSys::canvas()` now returns an `Option`. - **Breaking:** Overhaul keyboard input handling. - Replace `KeyboardInput` with `KeyEvent` and `RawKeyEvent`. - Change `WindowEvent::KeyboardInput` to contain a `KeyEvent`. - Change `Event::Key` to contain a `RawKeyEvent`. - Remove `Event::ReceivedCharacter`. In its place, you should use `KeyEvent.text` in combination with `WindowEvent::Ime`. - Replace `VirtualKeyCode` with the `Key` enum. - Replace `ScanCode` with the `KeyCode` enum. - Rename `ModifiersState::LOGO` to `SUPER` and `ModifiersState::CTRL` to `CONTROL`. - Add `PhysicalKey` wrapping `KeyCode` and `NativeKeyCode`. - Add `KeyCode` to refer to keys (roughly) by their physical location. - Add `NativeKeyCode` to represent raw `KeyCode`s which Winit doesn't understand. - Add `Key` to represent the keys after they've been interpreted by the active (software) keyboard layout. - Add `NamedKey` to represent the categorized keys. - Add `NativeKey` to represent raw `Key`s which Winit doesn't understand. - Add `KeyLocation` to tell apart `Key`s which usually "mean" the same thing, but can appear simultaneously in different spots on the same keyboard layout. - Add `Window::reset_dead_keys` to enable application-controlled cancellation of dead key sequences. - Add `KeyEventExtModifierSupplement` to expose additional (and less portable) interpretations of a given key-press. - Add `PhysicalKeyExtScancode`, which lets you convert between scancodes and `PhysicalKey`. - `ModifiersChanged` now uses dedicated `Modifiers` struct. - 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`. - Reexport `raw-window-handle` in `window` module. - Add `ElementState::is_pressed`. - Add `Window::pre_present_notify` to notify winit before presenting to the windowing system. - Add `Window::set_blur` to request a blur behind the window; implemented on Wayland for now. - Add `Window::show_window_menu` to request a titlebar/system menu; implemented on Wayland/Windows for now. - Implement `AsFd`/`AsRawFd` for `EventLoop` on X11 and Wayland. - Implement `PartialOrd` and `Ord` for `MouseButton`. - Implement `PartialOrd` and `Ord` on types in the `dpi` module. - Make `WindowBuilder` `Send + Sync`. - Make iOS `MonitorHandle` and `VideoMode` usable from other threads. - Make iOS windows usable from other threads. - On Android, add force data to touch events. - On Android, added `EventLoopBuilderExtAndroid::handle_volume_keys` to indicate that the application will handle the volume keys manually. - On Android, fix `DeviceId` to contain device id's. - On Orbital, fix `ModifiersChanged` not being sent. - On Wayland, `Window::outer_size` now accounts for **client side** decorations. - On Wayland, add `Window::drag_resize_window` method. - On Wayland, remove `WINIT_WAYLAND_CSD_THEME` variable. - On Wayland, fix `TouchPhase::Canceled` being sent for moved events. - On Wayland, fix forward compatibility issues. - On Wayland, fix initial window size not restored for maximized/fullscreened on startup window. - On Wayland, fix maximized startup not taking full size on GNOME. - On Wayland, fix maximized window creation and window geometry handling. - On Wayland, fix window not checking that it actually got initial configure event. - On Wayland, make double clicking and moving the CSD frame more reliable. - On Wayland, support `Occluded` event with xdg-shell v6 - On Wayland, use frame callbacks to throttle `RedrawRequested` events so redraws will align with compositor. - On Web, `ControlFlow::WaitUntil` now uses the Prioritized Task Scheduling API. `setTimeout()`, with a trick to circumvent throttling to 4ms, is used as a fallback. - On Web, `EventLoopProxy` now implements `Send`. - On Web, `Window` now implements `Send` and `Sync`. - 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, add `DeviceEvent::Motion`, `DeviceEvent::MouseWheel`, `DeviceEvent::Button` and `DeviceEvent::Key` support. - On Web, add `EventLoopWindowTargetExtWebSys` and `PollStrategy`, which allows to set different strategies for `ControlFlow::Poll`. By default the Prioritized Task Scheduling API is used, but an option to use `Window.requestIdleCallback` is available as well. Both use `setTimeout()`, with a trick to circumvent throttling to 4ms, as a fallback. - On Web, add `WindowBuilderExtWebSys::with_append()` to append the canvas element to the web page on creation. - On Web, allow event loops to be recreated with `spawn`. - On Web, enable event propagation. - On Web, fix `ControlFlow::WaitUntil` to never wake up **before** the given time. - On Web, fix `DeviceEvent::MouseMotion` only being emitted for each canvas instead of the whole window. - On Web, fix `Window:::set_fullscreen` doing nothing when called outside the event loop but during transient activation. - On Web, fix pen treated as mouse input. - On Web, fix pointer button events not being processed when a buttons is already pressed. - On Web, fix scale factor resize suggestion always overwriting the canvas size. - On Web, fix some `WindowBuilder` methods doing nothing. - On Web, fix some `Window` methods using incorrect HTML attributes instead of CSS properties. - On Web, fix the bfcache by not using the `beforeunload` event and map bfcache loading/unloading to `Suspended`/`Resumed` events. - On Web, fix touch input not gaining or loosing focus. - On Web, fix touch location to be as accurate as mouse position. - On Web, handle coalesced pointer events, which increases the resolution of pointer inputs. - On Web, implement `Window::focus_window()`. - On Web, implement `Window::set_(min|max)_inner_size()`. - On Web, implement `WindowEvent::Occluded`. - On Web, never return a `MonitorHandle`. - On Web, prevent clicks on the canvas to select text. - On Web, remove any fullscreen requests from the queue when an external fullscreen activation was detected. - On Web, remove unnecessary `Window::is_dark_mode()`, which was replaced with `Window::theme()`. - On Web, respect `EventLoopWindowTarget::listen_device_events()` settings. - On Web, scale factor and dark mode detection are now more robust. - On Web, send mouse position on button release as well. - On Web, take all transient activations on the canvas and window into account to queue a fullscreen request. - On Web, use `Window.requestAnimationFrame()` to throttle `RedrawRequested` events. - 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: fix `Window::request_redraw` not waking the event loop when called from outside the loop. - On Web: fix position of touch events to be relative to the canvas. - On Windows, add `drag_resize_window` method support. - On Windows, add horizontal MouseWheel `DeviceEvent`. - On Windows, added `WindowBuilderExtWindows::with_class_name` to customize the internal class name. - On Windows, fix IME APIs not working when from non event loop thread. - On Windows, fix `CursorEnter/Left` not being sent when grabbing the mouse. - On Windows, fix `RedrawRequested` not being delivered when calling `Window::request_redraw` from `RedrawRequested`. - On Windows, port to `windows-sys` version 0.48.0. - On X11, add a `with_embedded_parent_window` function to the window builder to allow embedding a window into another window. - On X11, fix event loop not waking up on `ControlFlow::Poll` and `ControlFlow::WaitUntil`. - On X11, fix false positive flagging of key repeats when pressing different keys with no release between presses. - On X11, set `visual_id` in returned `raw-window-handle`. - On iOS, add ability to change the status bar style. - On iOS, add force data to touch events when using the Apple Pencil. - On iOS, always wake the event loop when transitioning from `ControlFlow::Poll` to `ControlFlow::Poll`. - On iOS, send events `WindowEvent::Occluded(false)`, `WindowEvent::Occluded(true)` when application enters/leaves foreground. - On macOS, add tabbing APIs on `WindowExtMacOS` and `EventLoopWindowTargetExtMacOS`. - On macOS, fix assertion when pressing `Globe` key. - On macOS, fix crash in `window.set_minimized(false)`. - On macOS, fix crash when dropping `Window`. ### [`v0.28.7`](https://togithub.com/rust-windowing/winit/releases/tag/v0.28.7): Winit Version 0.28.7 [Compare Source](https://togithub.com/rust-windowing/winit/compare/v0.28.6...v0.28.7) - Fix window size sometimes being invalid when resizing on macOS 14 Sonoma.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] commented 2 weeks ago

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

The artifact failure details are included below:

File name: WGPU-Engine/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path WGPU-Engine/Cargo.toml --workspace
error: current package believes it's in a workspace when it's not:
current:   /tmp/renovate/repos/github/SakulFlee/Akimo-Project/WGPU-Engine/Cargo.toml
workspace: /tmp/renovate/repos/github/SakulFlee/Akimo-Project/Cargo.toml

this may be fixable by adding `WGPU-Engine` to the `workspace.members` array of the manifest located at: /tmp/renovate/repos/github/SakulFlee/Akimo-Project/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.