diff --git a/docs/docs/releases.md b/docs/docs/releases.md index 831dda30..86143d8a 100644 --- a/docs/docs/releases.md +++ b/docs/docs/releases.md @@ -10,6 +10,7 @@ language: 'en' ## 0.2.3 (unreleased) +- On macOS, fixed undocumented cursors (e.g. zoom, resize, help) always appearing to be invalid and falling back to the default cursor. - On X11, Wayland, Windows and macOS, improved scancode conversions for more obscure key codes. - On macOS, fixed the scancode conversion for audio volume keys. - On macOS, fixed the scancode conversion for `IntlBackslash`. diff --git a/rio-window/src/platform_impl/macos/cursor.rs b/rio-window/src/platform_impl/macos/cursor.rs index 95cec639..59c55020 100644 --- a/rio-window/src/platform_impl/macos/cursor.rs +++ b/rio-window/src/platform_impl/macos/cursor.rs @@ -4,7 +4,7 @@ use std::sync::OnceLock; use objc2::rc::Retained; use objc2::runtime::Sel; -use objc2::{msg_send_id, sel, ClassType}; +use objc2::{msg_send, msg_send_id, sel, ClassType}; use objc2_app_kit::{NSBitmapImageRep, NSCursor, NSDeviceRGBColorSpace, NSImage}; use objc2_foundation::{ ns_string, NSData, NSDictionary, NSNumber, NSObject, NSObjectProtocol, NSPoint, @@ -67,7 +67,7 @@ pub(crate) fn default_cursor() -> Retained { unsafe fn try_cursor_from_selector(sel: Sel) -> Option> { let cls = NSCursor::class(); - if cls.responds_to(sel) { + if msg_send![cls, respondsToSelector: sel] { let cursor: Retained = unsafe { msg_send_id![cls, performSelector: sel] }; Some(cursor)