From d5058b930bb931102ff108590328ab2f10c3de83 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Sat, 28 Nov 2026 08:14:13 +0800 Subject: [PATCH] fix(macos): stop restoring full screen from saved window state (#6607) Window state is kept per label, and project-N labels are reused by other projects. A full-screen flag saved once came back on every later project window, each claiming its own Space, some while still hidden and blank. macOS no longer saves or restores the full-screen flag; a window that was full screen comes back maximized. Windows and Linux are unchanged. Fixes #6430 --- src-tauri/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 429b7b39be..69ada005d1 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -394,7 +394,10 @@ fn window_state_flags() -> tauri_plugin_window_state::StateFlags { } #[cfg(not(target_os = "windows"))] { - StateFlags::SIZE | StateFlags::POSITION | StateFlags::MAXIMIZED | StateFlags::FULLSCREEN + // No FULLSCREEN on macOS: state is kept per window label, and `project-N` labels are reused + // by other projects, so a stale flag put later windows into full screen, each claiming a + // Space, some while still hidden and blank. A full-screen window comes back maximized. + StateFlags::SIZE | StateFlags::POSITION | StateFlags::MAXIMIZED } }