diff --git a/window/examples/wgpu.rs b/window/examples/wgpu.rs index d90d11b35..edbb39e8e 100644 --- a/window/examples/wgpu.rs +++ b/window/examples/wgpu.rs @@ -181,8 +181,11 @@ impl MyWindow { Ok(()) } + #[cfg(not(target_os = "macos"))] + fn fix_transparency(&mut self, _: &Window) {} + + #[cfg(target_os = "macos")] fn fix_transparency(&mut self, win: &Window) { - #[cfg(target_os = "macos")] if let RawWindowHandle::MacOS(h) = win.raw_window_handle() { use cocoa::base::{id, NO}; use objc::*;