mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-10 09:45:44 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 89a1ab60aa | |||
| 639f5bf091 | |||
| 97f15dee37 |
+13
-1
@@ -18553,6 +18553,17 @@ pub fn run() {
|
||||
main_window_builder = main_window_builder
|
||||
.inner_size(startup_size.width as f64, startup_size.height as f64)
|
||||
.prevent_overflow();
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
// Wry installs its parent WM_SETFOCUS handler while WebView2
|
||||
// is still being initialized. Keep the host hidden and
|
||||
// non-activatable until RunEvent::Ready so Windows cannot
|
||||
// re-enter that handler during native construction.
|
||||
main_window_builder = main_window_builder
|
||||
.visible(false)
|
||||
.focused(false)
|
||||
.focusable(false);
|
||||
}
|
||||
main_window_builder
|
||||
.build()
|
||||
.map_err(|error| format!("failed to create main window: {error}"))?;
|
||||
@@ -19890,7 +19901,8 @@ pub fn run() {
|
||||
.run(|app_handle, event| match event {
|
||||
tauri::RunEvent::Ready => {
|
||||
mark_main_window_startup_complete(app_handle);
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
#[cfg(target_os = "windows")]
|
||||
reveal_main_window(app_handle);
|
||||
restore_pending_main_window(app_handle);
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
|
||||
+17
-5
@@ -1,8 +1,20 @@
|
||||
import { initLogger } from "./utils/logger";
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
void initLogger();
|
||||
|
||||
const rootElement = document.getElementById("root");
|
||||
const rootElement = document.getElementById('root');
|
||||
if (rootElement) {
|
||||
rootElement.textContent = "Firelink startup control";
|
||||
rootElement.textContent = 'Firelink startup control';
|
||||
}
|
||||
|
||||
const documentLoaded = new Promise<void>(resolve => {
|
||||
const releaseAfterNativeLoad = () => window.setTimeout(resolve, 0);
|
||||
if (document.readyState === 'complete') {
|
||||
releaseAfterNativeLoad();
|
||||
} else {
|
||||
window.addEventListener('load', releaseAfterNativeLoad, { once: true });
|
||||
}
|
||||
});
|
||||
|
||||
void documentLoaded.then(async () => {
|
||||
await invoke<number>('begin_dock_badge_session');
|
||||
if (rootElement) rootElement.textContent = 'Firelink post-load IPC control';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user