Skip to content
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

Support precision scrolling #1814

Closed
wmww opened this issue Nov 14, 2020 · 0 comments · Fixed by #1830
Closed

Support precision scrolling #1814

wmww opened this issue Nov 14, 2020 · 0 comments · Fixed by #1830

Comments

@wmww
Copy link
Contributor

wmww commented Nov 14, 2020

Precision scrolling for touchpad users is an absolute must for a modern desktop. It looks like MirPointerEvent uses floats for all axis, so there might not be too much that needs to be plumbed up. Precision mouse movements might be nice as well.

bors bot added a commit that referenced this issue Dec 4, 2020
1830: Send sub-pixel input events to Wayland clients r=AlanGriffiths a=wmww

Fixes #1814, fixes #1828. This area of code will be a little nicer when #1829 is done, but I don't think we should block on that. As you can see we use the ugly and rather unsafe `std::pair<float, float>` types to represent sub-pixel positions, but the amount of code that has to handle this is not large.

Another option would be to send the event all the way through until we hit the Wayland wrapper call. This would be a good idea, but it seems pointer events aren't mutable and generic events aren't queryable, so we'd have to do a bunch of messy casting and IMO it's not worth it.

In the long run all this code will disappear once we address #1732 and make subsurfaces real input surfaces.

Co-authored-by: William Wold <wm@wmww.sh>
Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
@bors bors bot closed this as completed in 05b36ca Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant