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

Mapping Mouse Wheel Scrolling to Buttons is Inadequate #22

Open
Shinmera opened this issue Jun 4, 2017 · 3 comments
Open

Mapping Mouse Wheel Scrolling to Buttons is Inadequate #22

Shinmera opened this issue Jun 4, 2017 · 3 comments

Comments

@Shinmera
Copy link

Shinmera commented Jun 4, 2017

Mapping a mouse wheel scroll event to a single mouse button press event is inadequate, as it does not convey the distance by which the wheel was turned. Under some conditions the system will report a single scroll event for more than a single tick, or report an event for less than a tick. In effect this means that Glop forces applications to lose scrolling precision, which might be quite unfavourable for certain types of applications.

A proper handling of this case would introduce an additional event type that has a delta attribute that determines the number of ticks scrolled.

@patzy
Copy link
Collaborator

patzy commented Jun 5, 2017

Which platform are you talking about? Looking over the code it seems xlib only provides button events for mouse wheel, on win32 it looks like there's a mouse wheel event, not sure how osx handle this.
On xorg glop just process whatever is available as a next event so I'm not sure how it 'misses' scroll events.

@Shinmera
Copy link
Author

Shinmera commented Jun 5, 2017

Windows for one provides an interface like I described out of the box and Glop dumbs it down. Xlib 2.1+ also provides "high resolution scrolling" which could be used for better scrolling information. See here

@patzy
Copy link
Collaborator

patzy commented Jun 5, 2017

The link you provided is for XInput which afaik is an extension. 3b did some work on XI2 support here https://github.com/3b/glop/tree/xi2-rebased if you want to try it. I don't have the time or interest to add such an extension at the moment but feel free to hack it and send a pull request. Windows support should be easy, as you said the event is already here, just hidden. Problem is you'll want to provide a consistent interface and behavior for all platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants