Skip to content

Commit ca9d52d

Browse files
committed
refactor: enhance macOS setup by adding window title hiding functionality
1 parent dfd5e63 commit ca9d52d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src-tauri/src/setup/mac.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use tauri::AppHandle;
1+
use tauri::{AppHandle, Manager};
22

33
pub fn setup_mac(app: &AppHandle) -> tauri::Result<()> {
44
#[cfg(target_os = "macos")]
@@ -7,6 +7,11 @@ pub fn setup_mac(app: &AppHandle) -> tauri::Result<()> {
77
// don't show on the taskbar/springboard
88
app.set_activation_policy(tauri::ActivationPolicy::Accessory)?;
99
}
10+
11+
if let Some(window) = app.get_webview_window("main") {
12+
// Hide the title near the traffic light controls on macOS
13+
let _ = window.set_title("");
14+
}
1015
}
1116

1217
#[cfg(not(target_os = "macos"))]

0 commit comments

Comments
 (0)