[Input] Improve pointer clamping#1907
Merged
Drakulix merged 2 commits intopop-os:masterfrom Dec 22, 2025
Merged
Conversation
Member
|
I'm pretty sure this also fixes pop-os/cosmic-epoch#2683. So far I haven't been able to recreate it after this update. |
leviport
previously approved these changes
Dec 19, 2025
Member
leviport
left a comment
There was a problem hiding this comment.
This seems good to me. Tested on multi-monitor and single monitor configurations. I'm not sure that pop-os/cosmic-epoch#2683 is entirely solved, but this certainly makes it much harder to recreate.
262dd2f to
ea44fec
Compare
c8bd6e1 to
593ba89
Compare
- Reduces the max clamp value by 1, since it previously ended up 1 pixel off screen. Fixes pop-os#981. - Moves clamping to before `new_under`, since it previously ignored any motion that goes off screen, causing issues in some fullscreen clients. Fixes pop-os#1286.
Contributor
Author
|
This now has an extra change that might fix some gaming issues. I haven't noticed issues from some testing (and it really improves behavior in affected games), but not sure if it might regress something. |
Drakulix
approved these changes
Dec 22, 2025
Member
leviport
approved these changes
Dec 22, 2025
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.
This seems to match the behavior on other compositors and fixes #981.
I noticed that the cursor completely disappears when it's placed all the way to the right, rather than a small 1px portion still being visible like it is on other compositors or e.g. Windows, so it seemed like an off-by-one issue.
Moves pointer clamping to before
new_under, since it previously ignored any motion that goes off screen, causing issues in some fullscreen clients. Fixes #1286.The second (edit: now first) commit is optional, but some other components are already on 1.90, and it allows using
f64::next_down().Not sure if similar parts of the zoom code should also have the same change, since I'm not fully sure if it's affected by this.
Edit: I think not, since it seems to make the issue Levi mentioned easier to reproduce.