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

Send floating point pointer/touch position to Wayland clients #1828

Closed
wmww opened this issue Dec 1, 2020 · 0 comments · Fixed by #1830
Closed

Send floating point pointer/touch position to Wayland clients #1828

wmww opened this issue Dec 1, 2020 · 0 comments · Fixed by #1830

Comments

@wmww
Copy link
Contributor

wmww commented Dec 1, 2020

Mir events support floating point pointer and touch position, but it's collapsed down to ints in the Wayland frontend. Shouldn't be.

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
@bors bors bot closed this as completed in #1830 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