diff --git a/.changes/macos_build.md b/.changes/macos_build.md new file mode 100644 index 000000000..f842ba9bf --- /dev/null +++ b/.changes/macos_build.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +Fixed build on macos. \ No newline at end of file diff --git a/src/webview/wkwebview/mod.rs b/src/webview/wkwebview/mod.rs index b05977da5..c1e21ce31 100644 --- a/src/webview/wkwebview/mod.rs +++ b/src/webview/wkwebview/mod.rs @@ -417,7 +417,7 @@ impl InnerWebView { ns_window, respondsToSelector: sel!(setTitlebarSeparatorStyle:) ]; - if can_set_titlebar_style { + if can_set_titlebar_style == YES { // `1` means `none`, see https://developer.apple.com/documentation/appkit/nstitlebarseparatorstyle/none let () = msg_send![ns_window, setTitlebarSeparatorStyle: 1]; } @@ -546,7 +546,7 @@ r#"Object.defineProperty(window, 'ipc', { self.webview, respondsToSelector: sel!(printOperationWithPrintInfo:) ]; - if can_print { + if can_print == YES { // Create a shared print info let print_info: id = msg_send![class!(NSPrintInfo), sharedPrintInfo]; let print_info: id = msg_send![print_info, init];