Skip to content

Fix overlay growth on mixed-DPI displays - #14

Merged
xarthurx merged 1 commit into
mainfrom
codex/fix-overlay-dpi-growth
Aug 13, 2026
Merged

Fix overlay growth on mixed-DPI displays#14
xarthurx merged 1 commit into
mainfrom
codex/fix-overlay-dpi-growth

Conversation

@xarthurx

Copy link
Copy Markdown
Owner

Stops automatic full-state restore for the fixed-size overlay and restores only its saved position, preventing persisted physical dimensions from compounding across mixed-DPI launches. The resizable settings window continues restoring its full state. Verification: cargo test (208 unit tests and 6 integration tests); cargo clippy (completed with pre-existing warnings only); targeted rustfmt and git diff checks. Closes #13.

Copilot AI lite review requested due to automatic review settings August 10, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a mixed-DPI Windows issue where the fixed-size main overlay window could grow on each launch due to restoring a persisted (physical) size as logical pixels. It changes window-state restoration so the overlay restores only its saved position while keeping its configured 100×100 size, while the resizable settings window continues restoring full state.

Changes:

  • Configured tauri-plugin-window-state to skip automatic initial restore for the main overlay window and manually restore only POSITION during setup.
  • Updated docs to reflect the revised window-state behavior and added an Unreleased changelog entry describing the fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src-tauri/src/lib.rs Skips automatic full restore for main and restores only position via StateFlags::POSITION to prevent DPI-compounded overlay growth.
docs/CHANGELOG.md Adds Unreleased highlight + fix note describing the overlay growth prevention behavior.
docs/ARCHITECTURE.md Updates architecture docs to match the new “position-only restore for overlay” behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@xarthurx
xarthurx merged commit 44cb3f4 into main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overlay window grows by the display scale factor on every restore (mixed-DPI multi-monitor)

2 participants