From 8d1cde8d2cae0a5d817e1bc8905842aa1c69b665 Mon Sep 17 00:00:00 2001 From: NimBold Date: Thu, 27 Aug 2026 21:23:00 +0330 Subject: [PATCH] fix(startup): restore Windows renderer startup (#37) - Issue #37: Windows 1.4.0 exited before showing its main window.\n- Keep the logger state read independent of WebViewWindow extraction during WebView2 bootstrap.\n- Preserve main-window authorization for logging mutations and keep the process-wide pause state consistent across renderers.\n\nFixes #37. --- src-tauri/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 9edbd8f..e1f0f2c 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -18200,9 +18200,12 @@ fn toggle_log_pause(caller: tauri::WebviewWindow, pause: bool) -> Result<(), Str } #[tauri::command] -fn is_log_paused(caller: tauri::WebviewWindow) -> bool { - properties_window::ensure_main_window(&caller).is_ok() - && LOG_PAUSED.load(std::sync::atomic::Ordering::Relaxed) +fn is_log_paused() -> bool { + // This read is needed during renderer bootstrap, including by standalone + // Properties windows. Avoid extracting a WebviewWindow here: on Windows, + // WebView2 can invoke the command while its host is still initializing. + // Mutating logging commands remain restricted to the main window below. + LOG_PAUSED.load(std::sync::atomic::Ordering::Relaxed) } #[tauri::command]