Fix overlay growth on mixed-DPI displays - #14
Merged
Conversation
There was a problem hiding this comment.
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-stateto skip automatic initial restore for themainoverlay window and manually restore onlyPOSITIONduring 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.