@@ -89,6 +89,8 @@ impl WindowManager {
8989 #[ cfg( target_os = "macos" ) ]
9090 macos:: position_window_near_tray ( app, & window) ;
9191 #[ cfg( target_os = "macos" ) ]
92+ let _ = app. set_dock_visibility ( false ) ;
93+ #[ cfg( target_os = "macos" ) ]
9294 let _ = app. show ( ) ;
9395 let _ = window. show ( ) ;
9496 let _ = window. set_focus ( ) ;
@@ -103,6 +105,8 @@ impl WindowManager {
103105 Self :: build_full_window ( app) ?
104106 } ;
105107 #[ cfg( target_os = "macos" ) ]
108+ let _ = app. set_dock_visibility ( true ) ;
109+ #[ cfg( target_os = "macos" ) ]
106110 let _ = app. show ( ) ;
107111 let _ = window. show ( ) ;
108112 let _ = window. set_focus ( ) ;
@@ -123,10 +127,6 @@ pub(crate) fn show_new_ui_window(app: &AppHandle) {
123127 let _ = WindowManager :: open_tray ( app) ;
124128}
125129
126- pub ( crate ) fn show_new_ui_window_near_tray ( app : & AppHandle ) {
127- show_new_ui_window ( app) ;
128- }
129-
130130#[ tauri:: command]
131131pub fn open_new_ui_window ( app : AppHandle ) {
132132 show_new_ui_window ( & app) ;
@@ -142,9 +142,6 @@ pub fn open_old_ui_window(app: AppHandle) {
142142#[ tauri:: command]
143143pub fn swap_to_old_ui ( app : AppHandle ) {
144144 tracing:: info!( "swap_to_old_ui called" ) ;
145- #[ cfg( target_os = "macos" ) ]
146- let _ = app. set_dock_visibility ( true ) ;
147-
148145 if let Some ( window) = tauri:: Manager :: get_webview_window ( & app, NEW_UI_WINDOW_ID ) {
149146 if let Err ( err) = window. hide ( ) {
150147 tracing:: error!( "swap_to_old_ui task: Failed to hide new-ui window: {err:?}" ) ;
@@ -175,9 +172,6 @@ pub fn close_tray_window(app: AppHandle) {
175172#[ tauri:: command]
176173pub fn swap_to_new_ui ( app : AppHandle ) {
177174 tracing:: info!( "swap_to_new_ui called" ) ;
178- #[ cfg( target_os = "macos" ) ]
179- let _ = app. set_dock_visibility ( false ) ;
180-
181175 show_new_ui_window ( & app) ;
182176 if let Some ( window) = tauri:: Manager :: get_webview_window ( & app, OLD_UI_WINDOW_ID ) {
183177 if let Err ( err) = window. hide ( ) {
0 commit comments