-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative pointer protocol #757
Conversation
I'm not sure how best to test this protocol on it's own. I think in first person games it tends to be used together with |
Maybe the wine-wayland-patchset supports it? Also wlcs actually seems to have some relative-pointer tests, if you feel like enabling those tests for wlcs_anvil. |
Enabled the wlcs test for this, though it seems fairly rudimentary so it isn't really a complete test for relative pointer functionality. |
7fdea51
to
c714273
Compare
cd31070
to
03c844e
Compare
e271425
to
5c4c906
Compare
Add helper for the relative pointer protocol, and a way to send relative pointer events to clients. This also exposes unaccelerated vectors and microsecond timestamps in pointer events from the libinput backend. Enables `wlcs` relative pointer test, though what `wlcs` currently handles seems to be limited at this point. Adds relative pointer support for Anvil, exposing the global only on the `udev` backend so clients won't use the protocol but get no events.
5c4c906
to
2e62611
Compare
Codecov ReportBase: 25.27% // Head: 25.34% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #757 +/- ##
==========================================
+ Coverage 25.27% 25.34% +0.07%
==========================================
Files 130 131 +1
Lines 20882 21123 +241
==========================================
+ Hits 5277 5354 +77
- Misses 15605 15769 +164
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I've removed the somewhat incomplete pointer constraints implementation, and the remaining issues here should be fixed now. Pointer constraints can be added in a later PR. Real use cases seem to typically use this with pointer constraints, but https://github.com/Smithay/client-toolkit/blob/master/examples/relative_pointer.rs can demonstrate that a client receives the correct events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick, but in general looks reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, expect utime
vs time
. Can we unify those? What makes the relative-motion event have a higher precision?
`PointerMotionEvent` now doesn't need a separate `utime` method for relative pointer events.
I wonder if any of this could be simpler and less redundant...
Needs testing and probably some corrections.