From e790c9828f1ae85ce7618d06e67e78732be4221b Mon Sep 17 00:00:00 2001 From: Wes Date: Mon, 6 Jul 2026 15:22:57 -0600 Subject: [PATCH] fix(desktop): restore saved window geometry on launch (#1554) Signed-off-by: Wes Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> --- desktop/src-tauri/src/lib.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rs index c8ff5cfbe..e41d46a29 100644 --- a/desktop/src-tauri/src/lib.rs +++ b/desktop/src-tauri/src/lib.rs @@ -84,17 +84,9 @@ pub fn run() { .plugin(tauri_plugin_opener::init()) .plugin( tauri_plugin_window_state::Builder::default() - // The main window should always launch edge-to-edge in the - // available desktop area. Do not let stale saved geometry or - // fullscreen state override the maximized launch config. - .with_state_flags( - StateFlags::all() - & !(StateFlags::VISIBLE - | StateFlags::POSITION - | StateFlags::SIZE - | StateFlags::MAXIMIZED - | StateFlags::FULLSCREEN), - ) + // Visibility is excluded: the window starts hidden and the + // frontend shows it once ready. + .with_state_flags(StateFlags::all() & !StateFlags::VISIBLE) .build(), ) .plugin(tauri_plugin_websocket::init())