Skip to content

Commit

Permalink
fix(macos): set titlebar style to none (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 2, 2022
1 parent 67809f4 commit 9776fc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/macos-remove-titlebar-separator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Set the titlebar separator style in macOS to `none`.
9 changes: 8 additions & 1 deletion src/webview/wkwebview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,14 @@ impl InnerWebView {

// ns window is required for the print operation
#[cfg(target_os = "macos")]
let ns_window = window.ns_window() as id;
let ns_window = {
let ns_window = window.ns_window() as id;

// `1` means `none`, see https://developer.apple.com/documentation/appkit/nstitlebarseparatorstyle/none
let () = msg_send![ns_window, setTitlebarSeparatorStyle: 1];

ns_window
};

let w = Self {
webview,
Expand Down

0 comments on commit 9776fc4

Please sign in to comment.