window: fix warning when buildings tests on !macos

This commit is contained in:
Wez Furlong committed 2021-07-29 19:44:34 -07:00
1 parent 71e88a4fea
commit c867b4e079
1 file changed
+4 -1
+4 -1
View File
@@ -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::*;