glutin_window
glutin_window copied to clipboard
glutin's `LineDelta` and `MouseDelta` are being fed to the same `MouseScroll` event - we should handle this properly.
This is the case as of #66 .
I figured we could leave it this way for now as some support for the event is better than none at all, as long as we track the issue and address it sometime soon.
I see two possible approaches to this:
- Somehow test both
LineDeltaandPixelDeltaside-by-side and translateLineDeltato a reasonable pixel value, so that both may continue to be translated to theMouseScrollevent with better behaviour. - Add a
LineDeltaevent to the input events in piston.
Originally I thought 2. might be the safest option, however it would be a pain for users to have to handle both kinds of events, and piston is about exposing a nice simple API. If we can manage to do 1. I think that would be nicest, but I'm unsure about the feasibility of this, or whether or not we can make the behaviour consistent across platforms.
@bvssvni thoughts?
I would think it ideal to do both, provide a converted PixelDelta multiplied by a reasonable value that all applications will work with by default for things like common application scrolling. While providing a way to get at LineDelta for when you want to get individual clicks of the wheel, as commonly used in games for weapon switching etc.
@Nixes good idea!