Add window persistence across app restarts

This commit is contained in:
James Babcock committed 2026-08-01 15:27:44 -07:00
1 parent 02c09ef889
commit 37e95627b1
4 files changed
+127

No files matched your search

+5
View File
@@ -84,6 +84,8 @@ export type ShellConfig = {
requestShellRender: () => void;
/** Screen on/off changed: the controller blanks/unblanks the compositor. */
onScreenStateChanged: (on: boolean) => void;
/** Window registered/removed or foreground changed (persists the open-app list). */
onWindowsChanged?: () => void;
};
/** Which surfaces need re-rendering after an input event. */
@@ -246,6 +248,7 @@ class Shell {
this.windows.push(window);
if (this.windows.length - 1 === this.selectedIndex) this.noteWindowVisible(window.windowId);
}
this.config.onWindowsChanged?.();
}
/** Move a window to the front of the most-recently-visible order. */
@@ -290,6 +293,7 @@ class Shell {
next.requestRender();
}
}
this.config.onWindowsChanged?.();
this.config.requestShellRender();
}
@@ -619,6 +623,7 @@ class Shell {
previous?.setForeground?.(false);
next?.setForeground?.(true);
next?.requestRender();
this.config.onWindowsChanged?.();
}
private openVoiceDialog(options: {