diff --git a/src/changelog/unreleased.md b/src/changelog/unreleased.md index 9af6bc6337..359737be66 100644 --- a/src/changelog/unreleased.md +++ b/src/changelog/unreleased.md @@ -82,3 +82,7 @@ changelog entry. This feature was incomplete, and the equivalent functionality can be trivially achieved outside of `winit` using `objc2-ui-kit` and calling `UIDevice::currentDevice().userInterfaceIdiom()`. - On Web, remove unused `platform::web::CustomCursorError::Animation`. + +### Fixed + +- On MacOS, fix building with `feature = "rwh_04"`. diff --git a/src/platform_impl/apple/appkit/window_delegate.rs b/src/platform_impl/apple/appkit/window_delegate.rs index c50af9b6f9..cea7864629 100644 --- a/src/platform_impl/apple/appkit/window_delegate.rs +++ b/src/platform_impl/apple/appkit/window_delegate.rs @@ -1615,7 +1615,7 @@ impl WindowDelegate { pub fn raw_window_handle_rwh_04(&self) -> rwh_04::RawWindowHandle { let mut window_handle = rwh_04::AppKitHandle::empty(); window_handle.ns_window = self.window() as *const WinitWindow as *mut _; - window_handle.ns_view = Retained::as_ptr(&self.contentView().unwrap()) as *mut _; + window_handle.ns_view = Retained::as_ptr(&self.view()) as *mut _; rwh_04::RawWindowHandle::AppKit(window_handle) }