mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
`AnyClass::responds_to` delegates to `class_respondsToSelector`, a function provided by the Objective-C runtime. However, at some point, this began to return `false` for selectors referring to undocumented cursors, despite the cursors remaining accessible via said selectors. That this check fails prevents the cursors from being used. We can instead send `respondsToSelector:` to the `NSCursor` class itself. As an instance method, this is nominally impossible; however, Apple grants an exemption[1] that permits class objects to perform instance methods defined in the root class. Checking for the undocumented cursors in this way gets them working again, at least on macOS Sequoia 15.1.1. [1]: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocObjectsClasses.html#//apple_ref/doc/uid/TP30001163-CH11-TPXREF120
2.8 KiB
2.8 KiB
The format is based on Keep a Changelog.
The sections should follow the order Added, Changed, Deprecated,
Removed, and Fixed.
Platform specific changed should be added to the end of the section and grouped
by platform name. Common API additions should have , implemented at the end
for platforms where the API was initially implemented. See the following example
on how to add them:
### Added
- Add `Window::turbo()`, implemented on X11, Wayland, and Web.
- On X11, add `Window::some_rare_api`.
- On X11, add `Window::even_more_rare_api`.
- On Wayland, add `Window::common_api`.
- On Windows, add `Window::some_rare_api`.
When the change requires non-trivial amount of work for users to comply with it, the migration guide should be added below the entry, like:
- Deprecate `Window` creation outside of `EventLoop::run`
This was done to simply migration in the future. Consider the
following code:
// Code snippet.
To migrate it we should do X, Y, and then Z, for example:
// Code snippet.
The migration guide could reference other migration examples in the current changelog entry.
Unreleased
Added
- On macOS, add
WindowExtMacOS::set_borderless_gameandWindowAttributesExtMacOS::with_borderless_gameto fully disable the menu bar and dock in Borderless Fullscreen as commonly done in games. - On X11, the
windowexample now understands theX11_VISUAL_IDandX11_SCREEN_IDenv variables to test the respective modifiers of window creation. - On Android, the soft keyboard can now be shown using
Window::set_ime_allowed. - Add basic iOS IME support. The soft keyboard can now be shown using
Window::set_ime_allowed.
Fixed
- On macOS, fix
WindowEvent::Movedsometimes being triggered unnecessarily on resize. - On macOS, package manifest definitions of
LSUIElementwill no longer be overridden with the default activation policy, unless explicitly provided during initialization. - On macOS, fix crash when calling
drag_window()without a left click present. - On X11, key events forward to IME anyway, even when it's disabled.
- On Windows, make
ControlFlow::WaitUntilwork more precisely usingCREATE_WAITABLE_TIMER_HIGH_RESOLUTION. - On X11, creating windows on screen that is not the first one (e.g.
DISPLAY=:0.1) works again. - On X11, creating windows while passing
with_x11_screen(non_default_screen)works again. - On X11, fix XInput handling that prevented a new window from getting the focus in some cases.
- On macOS, fix crash when pressing Caps Lock in certain configurations.
- On iOS, fixed
MonitorHandle'sPartialEqandHashimplementations. - On macOS, fixed undocumented cursors (e.g. zoom, resize, help) always appearing to be invalid and falling back to the default cursor.