Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(shell): persist main window geometry across launches (#267)

2 months ago

b31f375
Authored
Davy7/26/2026, 10:11:24 PM
The main window was created at a fixed 1280x800 and centered on every
launch, so user resizes and repositions were discarded on restart.

Register tauri-plugin-window-state with SIZE | POSITION | MAXIMIZED.
The flags are spelled out rather than StateFlags::all() because the
other three fight designs the app already committed to: VISIBLE calls
show() during restore and would race the hidden-start reveal handshake
(and could persist "hidden" from a crashed run), FULLSCREEN would
reintroduce the AppKit full-screen state the zoom-button retarget
deliberately avoids, and DECORATIONS would make the saved file a second
writer for a titlebar the native shell pass configures every launch.

The fullscreen player is denied: it is created on the monitor the user
picked with geometry derived from that monitor, so a restored frame
would override the selection.

Closes #263

Parentdffb487

4 files changed
  • packaging/flatpak/generated/cargo-sources.json+13−0
  • src-tauri/Cargo.lock+16−0
  • src-tauri/Cargo.toml+1−0
  • src-tauri/src/lib.rs+23−1