Splash: borderless+transparent+launcher-dedup, idle-dispatch hide
This commit is contained in:
@@ -294,6 +294,13 @@ fn plugin_loaded_marker_path() -> PathBuf {
|
||||
dossier_dir().join("plugin_loaded.flag")
|
||||
}
|
||||
|
||||
fn splash_owner_marker_path() -> PathBuf {
|
||||
// Vor Launch von Rhino schreibt Launcher diesen Marker → Plugin-Splash
|
||||
// (rhino/_startup_splash.py) prueft beim Show ob Marker frisch (<30s)
|
||||
// ist und skippt dann, damit nicht beide Splashes gleichzeitig laufen.
|
||||
dossier_dir().join("splash_owner_launcher.flag")
|
||||
}
|
||||
|
||||
fn open_rhino_internal(app: &tauri::AppHandle, path3dm: &str) -> Result<(), String> {
|
||||
let settings = load_settings();
|
||||
// XML-Edit nur sinnvoll wenn Rhino nicht laeuft (sonst ueberschreibt's
|
||||
@@ -314,8 +321,11 @@ fn open_rhino_internal(app: &tauri::AppHandle, path3dm: &str) -> Result<(), Stri
|
||||
// Splash NUR zeigen wenn Auto-Load aktiv (sonst gibt's nichts zu warten).
|
||||
let show_splash = settings.auto_load_plugin;
|
||||
let marker = plugin_loaded_marker_path();
|
||||
let owner_marker = splash_owner_marker_path();
|
||||
if show_splash {
|
||||
let _ = fs::remove_file(&marker);
|
||||
// Owner-Marker: signalisiert dem Plugin-Splash dass Launcher uebernimmt
|
||||
let _ = fs::write(&owner_marker, b"launcher");
|
||||
if let Some(splash) = app.get_webview_window("splash") {
|
||||
let _ = splash.show();
|
||||
}
|
||||
@@ -344,6 +354,7 @@ fn open_rhino_internal(app: &tauri::AppHandle, path3dm: &str) -> Result<(), Stri
|
||||
std::thread::sleep(std::time::Duration::from_millis(250));
|
||||
}
|
||||
let _ = fs::remove_file(&marker);
|
||||
let _ = fs::remove_file(&owner_marker);
|
||||
if let Some(splash) = app_clone.get_webview_window("splash") {
|
||||
let _ = splash.hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user