fix unreachable edge pixels on scaled outputs - #45
Merged
Conversation
Switch pointer coordinate conversions from `round` to `floor` across the codebase. This change is coupled with an adjustment to pointer clamping logic for output bounds. The previous clamping to `size - 1` combined with `round` made the last logical pixel row/column unreachable. This affected edge-scrolling, 1px resize handles, and Fitts's law at screen edges. By using `to_i32_floor` for hit-tests and clamping to `size - 0.5`, the pointer now correctly registers within the last logical pixel's bounds, ensuring the full output area is accessible and interactive.
Owner
|
thanks! LGTM! |
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.
Same defect and fix shape as pop-os/cosmic-comp#2568 (pop-os/cosmic-comp#2568), which replaced an identical logical_size - 1 pointer clamp with the midpoint between the last logical pixel and the edge. Their reporter hit it as broken edge-scrolling in games at 3840×2160 with 175% scaling; their test matrix went from 16/55 to 53/55 passing combinations. The to_i32_floor changes here are the equivalent of their tiling/mod.rs rounding fix.