File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
fixtures/e2e-apps/tauri/src-tauri/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,17 @@ async fn switch_to_main(app: tauri::AppHandle) -> Result<(), String> {
224224}
225225
226226fn main ( ) {
227+ let is_splash = std:: env:: var ( "ENABLE_SPLASH_WINDOW" ) . is_ok ( ) ;
228+ eprintln ! ( "[Tauri-DEBUG] ENABLE_SPLASH_WINDOW={}" , is_splash) ;
229+
227230 tauri:: Builder :: default ( )
228231 . plugin ( tauri_plugin_wdio:: init ( ) )
229- . setup ( |app| {
230- let is_splash = std :: env :: var ( "ENABLE_SPLASH_WINDOW" ) . is_ok ( ) ;
232+ . setup ( move |app| {
233+ eprintln ! ( "[Tauri-DEBUG] Setup called, is_splash={}" , is_splash ) ;
231234
232235 if is_splash {
236+ // Only create the splash window when splash is enabled
237+ // This matches the Electron behavior - main window is created lazily via switch_to_main
233238 let _splash = tauri:: WebviewWindowBuilder :: new (
234239 app,
235240 "splash" ,
@@ -242,6 +247,7 @@ fn main() {
242247 . transparent ( true )
243248 . build ( )
244249 . expect ( "Failed to create splash window" ) ;
250+ eprintln ! ( "[Tauri-DEBUG] Created splash window only" ) ;
245251 } else {
246252 create_main_window ( app. handle ( ) ) ;
247253 }
You can’t perform that action at this time.
0 commit comments