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
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-28 08:14:13 +08:00
1 джерело 44aab11296
коміт d5058b930b
1 file changed
+4 -1
+4 -1
Переглянути файл
@@ -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
}
}