Skip to content

Conversation

@skrmc
Copy link
Contributor

@skrmc skrmc commented Jan 22, 2026

Fixes #3298.

The workspace render rectangles could end up at fractional physical positions, causing a mismatch near the edge.

This PR rounds the workspace origin to physical pixels using existing helpers:
to_physical_precise_round(scale).to_logical(scale).

@YaLTeR
Copy link
Owner

YaLTeR commented Jan 25, 2026

Good catch but the problem is actually deeper. All components of the position are already rounded to physical pixels, but the final coordinate ends up very very slightly off due to floating-point rounding. I'm thinking what's the best fix here is and what other places could be affected.

@YaLTeR
Copy link
Owner

YaLTeR commented Jan 25, 2026

Specifically, in this case, the cursor y is 0 and the workspace y is 0.0000000000002

@YaLTeR YaLTeR enabled auto-merge (rebase) January 25, 2026 10:17
@YaLTeR YaLTeR merged commit 9261fd6 into YaLTeR:main Jan 25, 2026
13 checks passed
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 25, 2026

Thanks. I added a clarifying comment and a test

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.

Top-edge pointer events missed on non-first workspace (scale ≠ 1)

2 participants