mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
The first window opens at 1440 x 900 when the screen has room for it around a taskbar or Dock, and maximized (with a size that fits once un-maximized) when it doesn't, as on 1600 x 900, 1366 x 768 or 150% scaled 1080p screens. The window's size, position and maximized state are saved with the UI preferences (UiState::window) and restored at the next launch, moved fully onto a monitor that is still connected and maximized if it no longer fits. Root cause: main.rs created the window at a fixed 1440 x 900 at the system's default position, never checked it against the monitor and never remembered it. The new apps/vectorcraft/src/window.rs places the still-hidden window from the monitors winit reports (CreationContext::winit_window) and tracks its geometry every frame. Co-Authored-By: Claude Opus 5.5 <[email protected]>