Remember window positions in state.edn, per app
CI / test (push) Failing after 37s

:windows {"app.id" {:x :y :w :h}} is written when a floating window is dragged or resized and
read at startup; an app opening later gets its last place (floating, clamped on screen).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-25 03:14:58 -08:00
1 parent 4b99b0063e
commit 235f17cd70
4 files changed
+121 -6

No files matched your search

+3
View File
@@ -191,6 +191,8 @@ pub(all) struct DesktopShell {
mut booted : Bool
/// Read and write panel.edn (the compositor binary turns this on; tests leave it off).
mut persist : Bool
/// Last floating position and size (x, y, w, h) of each app's window, by app id (persisted).
win_geoms : Map[String, (Int, Int, Int, Int)]
mut tokens : @theme.Tokens
mut screen_w : Int
/// Desktop card position (once moved) and drag state.
@@ -268,6 +270,7 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
catalog_named: false,
booted: false,
persist: false,
win_geoms: {},
tokens: conv_theme(@scene.ThemeTokens::moon_night()),
screen_w: 0,
desk_set: false,