Skip to content

fix unreachable edge pixels on scaled outputs - #45

Merged
bea4dev merged 1 commit into
bea4dev:mainfrom
sophietheopossum:edge-pixels
Jul 30, 2026
Merged

fix unreachable edge pixels on scaled outputs#45
bea4dev merged 1 commit into
bea4dev:mainfrom
sophietheopossum:edge-pixels

Conversation

@sophietheopossum

Copy link
Copy Markdown
Contributor

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.

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.
@bea4dev

bea4dev commented Jul 30, 2026

Copy link
Copy Markdown
Owner

thanks! LGTM!

@bea4dev
bea4dev merged commit fcf71d1 into bea4dev:main Jul 30, 2026
@sophietheopossum
sophietheopossum deleted the edge-pixels branch July 30, 2026 08:10
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.

2 participants