From f83a5339c73ea00e685b7da0c2c0ea9c86c04e4d Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Fri, 1 May 2026 16:16:06 +0800 Subject: [PATCH] fix(windows): remove native titlebar before first show --- openless-all/app/src-tauri/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openless-all/app/src-tauri/src/lib.rs b/openless-all/app/src-tauri/src/lib.rs index b15723ea..94684d77 100644 --- a/openless-all/app/src-tauri/src/lib.rs +++ b/openless-all/app/src-tauri/src/lib.rs @@ -105,12 +105,17 @@ pub fn run() { #[cfg(target_os = "windows")] { use window_vibrancy::apply_mica; - if let Err(e) = apply_mica(&main, None) { - log::warn!("[main] mica failed: {e}"); - } + // The window starts hidden so Windows native chrome can be disabled before + // the first show; doing this after the native frame is visible is unreliable. if let Err(e) = main.set_decorations(false) { log::warn!("[main] disable native decorations failed: {e}"); } + if let Err(e) = apply_mica(&main, None) { + log::warn!("[main] mica failed: {e}"); + } + } + if let Err(e) = main.show() { + log::warn!("[main] initial show failed: {e}"); } }