glutin_window icon indicating copy to clipboard operation
glutin_window copied to clipboard

glutin's `LineDelta` and `MouseDelta` are being fed to the same `MouseScroll` event - we should handle this properly.

Open mitchmindtree opened this issue 9 years ago • 2 comments

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:

  1. Somehow test both LineDelta and PixelDelta side-by-side and translate LineDelta to a reasonable pixel value, so that both may continue to be translated to the MouseScroll event with better behaviour.
  2. Add a LineDelta event 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?

mitchmindtree avatar Nov 10 '15 04:11 mitchmindtree

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 avatar Nov 10 '15 05:11 Nixes

@Nixes good idea!

mitchmindtree avatar Nov 10 '15 05:11 mitchmindtree