mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-01 13:38:01 +00:00
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.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user