chore(deps): update rust crate winit to 0.30 #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.29
->0.30
Release Notes
rust-windowing/winit (winit)
v0.30.5
: Winit version 0.30.5Compare Source
Added
ActiveEventLoop::system_theme()
, returning the current system theme.Error
forplatform::web::CustomCursorError
.{Active,}EventLoopExtAndroid::android_app()
to access the app used to create the loop.Fixed
feature = "rwh_04"
.WindowEvent::Cursor*
.Window::theme()
if no theme override is set.v0.30.4
: Winit version 0.30.4Compare Source
Changed
DeviceId::dummy()
andWindowId::dummy()
are no longer markedunsafe
.Fixed
WindowEvent::Resized
not usingrequestAnimationFrame
when sendingWindowEvent::RedrawRequested
and also potentially causingWindowEvent::RedrawRequested
to not be de-duplicated.
v0.30.3
: Winit version 0.30.3Compare Source
Added
EventLoopExtWebSys::(set_)poll_strategy()
to allow settingcontrol flow strategies before starting the event loop.
WaitUntilStrategy
, which allows to set different strategies forControlFlow::WaitUntil
. By default the Prioritized Task Scheduling API isused, with a fallback to
setTimeout()
with a trick to circumvent throttlingto 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
NSWindow
instead of application-wide.Fixed
WindowBuilder::with_theme
not having any effect on the window.v0.30.2
: Winit version 0.30.2Compare Source
Fixed
EventLoopProxy::send_event()
triggering event loop immediatelywhen not called from inside the event loop. Now queues a microtask instead.
CursorIcon::Default
.InnerSizeWriter::request_inner_size()
.v0.30.1
: Winit version 0.30.1Compare Source
Added
raw-window-handle
versions 0.4 and 0.5 asraw_window_handle_04
andraw_window_handle_05
.ApplicationHandler
for&mut
references and heap allocations to something that implementsApplicationHandler
.EventLoopExtWayland
andEventLoopExtX11
, providing methodsis_wayland
andis_x11
onEventLoop
.Fixed
Ime::Preedit
.v0.30.0
: Winit version 0.30.0Compare Source
Added
OwnedDisplayHandle
type for allowing safe display handle usage outside oftrivial cases.
ApplicationHandler<T>
trait which mimicsEvent<T>
.WindowBuilder::with_cursor
andWindow::set_cursor
which takes aCursorIcon
orCustomCursor
.Sync
implementation forEventLoopProxy<T: Send>
.Window::default_attributes
to get defaultWindowAttributes
.EventLoop::builder
to getEventLoopBuilder
without export.CustomCursor::from_rgba
to allow creating cursor images from RGBA data.CustomCursorExtWebSys::from_url
to allow loading cursor images from URLs.CustomCursorExtWebSys::from_animation
to allow creating animatedcursors from other
CustomCursor
s.{Active,}EventLoop::create_custom_cursor
to load custom cursor image sources.ActiveEventLoop::create_window
andEventLoop::create_window
.CustomCursor
which could be set viaWindow::set_cursor
, implemented onWindows, macOS, X11, Wayland, and Web.
Event.preventDefault()
onWindow
.PinchGesture
,DoubleTapGesture
,PanGesture
andRotationGesture
.UIGestureRecognizerDelegate
for fine grained control of gesture recognizers.with_title_text_color
, andwith_corner_preference
onWindowAttributesExtWindows
.AnyThread
API to access window handle off the main thread.Changed
1.65
to1.70
.sctk-adwaita
to0.9.0
, which changed system librarycrates. This change is a cascading breaking change, you must do breaking
change as well, even if you don't expose winit.
TouchpadMagnify
toPinchGesture
.SmartMagnify
toDoubleTapGesture
.TouchpadRotate
toRotationGesture
.EventLoopWindowTarget
toActiveEventLoop
.platform::x11::XWindowType
toplatform::x11::WindowType
.VideoMode
toVideoModeHandle
to represent that it doesn't holdstatic data.
Debug
formatting ofWindowId
more concise.dpi
types to its own crate, and re-export it from the root crate.log
withtracing
, uselog
feature ontracing
to restore oldbehavior.
EventLoop::with_user_event
now returnsEventLoopBuilder
.HandleError::Unavailable
when a window handle is not available.RawWindowHandle::WebCanvas
instead ofRawWindowHandle::Web
.HandleError::Unavailable
when a window handle is not available.HandleError::Unavailable
when a window handle is not available.WS_CAPTION
,WS_BORDER
, andWS_EX_WINDOWEDGE
stylesfor child windows without decorations.
ndk
to0.9.0
andandroid-activity
to0.6.0
,and remove unused direct dependency on
ndk-sys
.Deprecated
Deprecate
EventLoop::run
, useEventLoop::run_app
.Deprecate
EventLoopExtRunOnDemand::run_on_demand
, useEventLoop::run_app_on_demand
.Deprecate
EventLoopExtPumpEvents::pump_events
, useEventLoopExtPumpEvents::pump_app_events
.The new
app
APIs accept a newly addedApplicationHandler<T>
instead ofFn
. The semantics are mostly the same, given that the capture list of theclosure is your new
State
. Consider the following code:To migrate this code, you should move all the captured values into some
newtype
State
and implementApplicationHandler
for this type. Finally,we move particular
match event
arms into methods onApplicationHandler
,for example:
Please submit your feedback after migrating in this issue.
Deprecate
Window::set_cursor_icon
, useWindow::set_cursor
.Removed
Remove
Window::new
, useActiveEventLoop::create_window
instead.You now have to create your windows inside the actively running event loop
(usually the
new_events(cause: StartCause::Init)
orresumed()
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
thatwill allow you to bypass this restriction in this release.
Using the migration example from above, you can change your code as follows:
Remove
Deref
implementation forEventLoop
that gaveEventLoopWindowTarget
.Remove
WindowBuilder
in favor ofWindowAttributes
.Remove Generic parameter
T
fromActiveEventLoop
.Remove
EventLoopBuilder::with_user_event
, useEventLoop::with_user_event
.Remove Redundant
EventLoopError::AlreadyRunning
.Remove
WindowAttributes::fullscreen
and expose as field directly.On X11, remove
platform::x11::XNotSupported
export.Fixed
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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.