pub(crate) fn forget_windows_left_by_quit(store: &Store) -> usizeExpand description
At startup, before anything reads the windows: when the last run ended in
a quit that saved every window (the record is a quit’s), a window still
listed is one whose close didn’t reach srv before it stopped. The host
closes windows concurrently and srv can exit first; seen in a simulated
upgrade, where the second window’s row survived and the main window then
took it instead of restoring the session. The record holds that window, so
forget its row: the first window then restores every window as designed.
Its workspace stays when the record names it (the restore reopens it), and
goes with its tabs and panes when it doesn’t (a record an older build
wrote, which rebuilds it instead). Only the windows the quit saved (its
window_ids) are forgotten: a record left from an older quit never costs a
later run its windows. Returns how many it forgot.