Repository navigation
Conversation
Collaborator
|
Fixes #3 |
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.
Dragging or releasing the pet on a Retina display can move it outside every monitor.
onMovedreports physical coordinates, but manual dragging and inertia write logical coordinates into the same position reference and send physical move-event coordinates back asLogicalPosition. Saved positions are also restored without checking whether the monitor still exists or whether the whole pet fits inside its work area.This change keeps cursor samples, window movement, inertia, and saved positions in physical pixels. DOM grab offsets and logical speed limits are converted using the window scale factor. Physical coordinates are rounded before crossing the native
PhysicalPosition<i32>boundary. Dragging and inertia both clamp the whole pet to the native monitor work area; startup and tray/shortcut opening recover positions inside the nearest available work area and persist the corrected coordinates.Reproduction on v0.2.0
A deterministic recovery reproduction is to quit the application, set only
petXandpetYin its config to an out-of-bounds physical point, and restart. The observed values were(7278, 3250)on a3600 × 2338physical display (1800 × 1169logical). The fixed application restores this to(3280, 2018)inside that display's actual work area, including the full 320-pixel physical pet size.Validation
make all: formatting, Clippy, ESLint, TypeScript, Cargo checks, 110 frontend tests and 27 Rust tests pass.npm run tauri build -- --no-bundle: macOS ARM64 release build passes.(1640, 1009, 160, 160)in logical screen coordinates.