Skip to content

Commit 3bbe968

Browse files
committed
chore: add debug
1 parent f09c955 commit 3bbe968

File tree

1 file changed

+9
-2
lines changed
  • fixtures/e2e-apps/tauri/src-tauri/src

1 file changed

+9
-2
lines changed

fixtures/e2e-apps/tauri/src-tauri/src/main.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,17 @@ async fn switch_to_main(app: tauri::AppHandle) -> Result<(), String> {
224224
}
225225

226226
fn 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",
@@ -241,7 +246,9 @@ fn main() {
241246
.decorations(false)
242247
.transparent(true)
243248
.build()
249+
.set_focus()
244250
.expect("Failed to create splash window");
251+
eprintln!("[Tauri-DEBUG] Created splash window only");
245252
} else {
246253
create_main_window(app.handle());
247254
}

0 commit comments

Comments
 (0)