bevy
bevy copied to clipboard
Update winit requirement from 0.29 to 0.30
Updates the requirements on winit to permit the latest version.
Release notes
Sourced from winit's releases.
Winit version 0.30.0
Added
- Add
OwnedDisplayHandletype for allowing safe display handle usage outside of trivial cases.- Add
ApplicationHandler<T>trait which mimicsEvent<T>.- Add
WindowBuilder::with_cursorandWindow::set_cursorwhich takes aCursorIconorCustomCursor.- Add
Syncimplementation forEventLoopProxy<T: Send>.- Add
Window::default_attributesto get defaultWindowAttributes.- Add
EventLoop::builderto getEventLoopBuilderwithout export.- Add
CustomCursor::from_rgbato allow creating cursor images from RGBA data.- Add
CustomCursorExtWebSys::from_urlto allow loading cursor images from URLs.- Add
CustomCursorExtWebSys::from_animationto allow creating animated cursors from otherCustomCursors.- Add
{Active,}EventLoop::create_custom_cursorto load custom cursor image sources.- Add
ActiveEventLoop::create_windowandEventLoop::create_window.- Add
CustomCursorwhich could be set viaWindow::set_cursor, implemented on Windows, macOS, X11, Wayland, and Web.- On Web, add to toggle calling
Event.preventDefault()onWindow.- On iOS, add
PinchGesture,DoubleTapGesture,PanGestureandRotationGesture.- on iOS, use
UIGestureRecognizerDelegatefor fine grained control of gesture recognizers.- On macOS, add services menu.
- On Windows, add
with_title_text_color, andwith_corner_preferenceonWindowAttributesExtWindows.- On Windows, implement resize increments.
- On Windows, add
AnyThreadAPI to access window handle off the main thread.Changed
- Bump MSRV from
1.65to1.70.- On Wayland, bump
sctk-adwaitato0.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
TouchpadMagnifytoPinchGesture.- Rename
SmartMagnifytoDoubleTapGesture.- Rename
TouchpadRotatetoRotationGesture.- Rename
EventLoopWindowTargettoActiveEventLoop.- Rename
platform::x11::XWindowTypetoplatform::x11::WindowType.- Rename
VideoModetoVideoModeHandleto represent that it doesn't hold static data.- Make
Debugformatting ofWindowIdmore concise.- Move
dpitypes to its own crate, and re-export it from the root crate.- Replace
logwithtracing, uselogfeature ontracingto restore old behavior.EventLoop::with_user_eventnow returnsEventLoopBuilder.- On Web, return
HandleError::Unavailablewhen a window handle is not available.- On Web, return
RawWindowHandle::WebCanvasinstead ofRawWindowHandle::Web.- On Web, remove queuing fullscreen request in absence of transient activation.
- On iOS, return
HandleError::Unavailablewhen a window handle is not available.
... (truncated)
Commits
4b3c065Winit version 0.30.00812adcAdd UIGestureRecognizerDelegate and PanGestureRecogniser (#3597)cd6ec19Don't set the background color when initializing with transparency (#3657)61bd817chore: fix some typos in comments (#3635)c04c113chore: ensure that.cargoconfig is not publishedce32a30android: bump tondk 0.9.0andandroid-activity 0.6.01682703bugfix(win32): Only return win handle on OK threadbdd80c8Add .git-blame-ignore-revs7b0c7b6chore(rustfmt): use nightly (#2325)7006c7cbugfix(android): AllowVolume*keys to be passed to the user- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
I'm taking a stab at this update but I still need to figure some things out. I'll push a PR sometime this week if I have any success with it.
@mnmaita I started taking a look, this will require a rewrite of most of the event loop. instead of one closure, Bevy now needs to pass a struct that implement a trait, and with a function by kind of event. it should be straightforward, but it will change a lot of lines.
This will need to be validated on all platforms, and Android is currently completely broken, so that's not possible...
You will also need to update access kit and access kit_winit at the same time.
@mockersf thanks for the tip. What I'm wondering is if the trait has to be implemented for WinitAppRunnerState or if we need a different state struct for this... Any pointers will be very appreciated.
Regarding platforms I should be able to test it on most of them except MacOS and iOS, but I assume we can find volunteers to test in them.
@Brezak or @pietrosophya could have opinions on that
I think it should be renamed / merged with some of the other fields used for the event loop. Up to you if you prefer to keep it as close to how it currently is, or if you want to do that refactor at the same time
@mockersf thanks for the tip. What I'm wondering is if the trait has to be implemented for
WinitAppRunnerStateor if we need a different state struct for this... Any pointers will be very appreciated.
~A new struct would be the better option. The closure maintains more state than just runner_state. All of that would probably go into the struct~
We might want to hold of on this until the non-Send stuff gets merged. It recently got picked up by @hymm.
I wouldn't worry about it for now if this is coming soon. My target is to have something ready after 0.14 is released.
Not to add pressure or anything, but after some investigation it seems Android support will be broken on Rust stable until Bevy is updated to winit 0.30 which brings android-activity 0.6
I created a draft PR here.
Closing this one in favor of https://github.com/bevyengine/bevy/pull/13366
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.