Compare commits

..

1 Commits

Author SHA1 Message Date
NimBold ceaf8095ac test(startup): isolate main WebView construction for issue 37 2026-08-27 20:46:48 +03:30
2 changed files with 11 additions and 4 deletions
+1
View File
@@ -30,6 +30,7 @@ const child = spawn(executable, [], {
env: {
...process.env,
FIRELINK_SMOKE_TEST: '1',
FIRELINK_SKIP_MAIN_WINDOW: '1',
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
GDK_BACKEND: 'x11',
},
+10 -4
View File
@@ -3996,6 +3996,9 @@ fn mark_main_window_startup_complete(app_handle: &tauri::AppHandle) {
#[cfg(target_os = "windows")]
fn reveal_main_window(app_handle: &tauri::AppHandle) {
if let Some(window) = app_handle.get_webview_window("main") {
if let Err(error) = window.set_focusable(true) {
log::warn!("Could not make the main window focusable: {error}");
}
if let Err(error) = window.show() {
eprintln!("Failed to reveal the main window: {error}");
}
@@ -18555,11 +18558,14 @@ pub fn run() {
// re-enter that handler during native construction.
main_window_builder = main_window_builder
.visible(false)
.focused(false);
.focused(false)
.focusable(false);
}
if std::env::var_os("FIRELINK_SKIP_MAIN_WINDOW").is_none() {
main_window_builder
.build()
.map_err(|error| format!("failed to create main window: {error}"))?;
}
main_window_builder
.build()
.map_err(|error| format!("failed to create main window: {error}"))?;
restore_pending_main_window(app.handle());
#[cfg(any(target_os = "windows", target_os = "linux"))]