@@ -6,7 +6,7 @@ use crate::version::{
66} ;
77use tauri:: {
88 webview:: { DownloadEvent , WebviewWindowBuilder } ,
9- AppHandle , Emitter , Manager , WebviewUrl , WindowEvent ,
9+ AppHandle , Emitter , Manager , WebviewUrl ,
1010} ;
1111use tauri_plugin_decorum:: WebviewWindowExt ;
1212
1515 cocoa:: appkit:: { NSColor , NSView , NSWindow } ,
1616 cocoa:: base:: { id, nil, NO , YES } ,
1717 objc:: { msg_send, sel, sel_impl} ,
18- tauri:: TitleBarStyle ,
18+ tauri:: { TitleBarStyle , WindowEvent } ,
1919} ;
2020
2121pub const MACOS_TRAFFIC_LIGHTS_INSET_X : f32 = 16.0 ;
@@ -29,10 +29,13 @@ pub fn _setup_main_window(app: &AppHandle, url: WebviewUrl) {
2929 . focused ( true )
3030 . maximized ( true )
3131 . min_inner_size ( 800.0 , 600.0 )
32- . hidden_title ( true )
33- . title_bar_style ( TitleBarStyle :: Overlay )
3432 . inner_size ( 1200.0 , 720.0 ) ;
3533
34+ #[ cfg( target_os = "macos" ) ]
35+ let win_builder = win_builder
36+ . title_bar_style ( TitleBarStyle :: Overlay )
37+ . hidden_title ( true ) ;
38+
3639 // Set up download handler
3740 let win_builder = win_builder. on_download ( |_webview, event| {
3841 match event {
0 commit comments