diff --git a/window/src/os/macos/window.rs b/window/src/os/macos/window.rs index 32bd99a61..a1eb2978f 100644 --- a/window/src/os/macos/window.rs +++ b/window/src/os/macos/window.rs @@ -822,13 +822,13 @@ impl WindowOps for Window { _config: &ConfigHandle, window_state: WindowState, ) -> anyhow::Result> { - let raw = self.raw_window_handle(); + let raw = self.window_handle()?; // We implement this method primarily to provide Notch-avoidance for // systems with a notch. // We only need this for non-native full screen mode. - let native_full_screen = match raw { + let native_full_screen = match raw.as_raw() { RawWindowHandle::AppKit(raw) => { let style_mask = unsafe { NSWindow::styleMask(raw.ns_window as *mut Object) }; style_mask.contains(NSWindowStyleMask::NSFullScreenWindowMask)