Expand description
DPI-independent window geometry persistence and restore.
Base: CodeRight’s window_state (the most developed donor: logical-pixel storage, v0 -> v1
migration, exact-dimension / intersecting / nearest-monitor selection, on-screen title bar
clamp, maximised-state memory). Changes: no tokio (debounce on a thread), the state file lives
under the shell’s per-app directory, and every label is tracked, not only main.
Structs§
- Logical
Rect - Monitor
Snapshot - Restore
Options - What
WindowStateStore::restore_withdoes besides positioning. The default does nothing else, which is whatrestoreand the full plugin have always done. - Window
State - Window
State Store - Per-app store with debounced saves.
Enums§
- Legacy
Import - Result of
WindowStateStore::import_legacy.
Traits§
- Restore
Target - The window calls a restore makes, so the order is testable without a window.
Functions§
- apply_
restore - Geometry first (size and position, then maximised), then the requested visibility.
- next_
state - The state to save next.
geometryis the live(x, y, width, height)in logical pixels and is only read for a window that is neither maximised nor minimised; otherwise the last normal geometry is kept (or the default rectangle when none was saved). - restoreable_
state - Pure geometry projection: where should a saved window land on the current monitors?