Add libinput_event_pointer_get_axis_value_discrete() to count wheel clicks
The recent normalization of wheel events means we get the angle in degrees but we don't know how this corresponds to clicks. The M325 has a 20 degree click angle, most other mice have 15 degrees. So an angle of 60 can be 3 or 4 click events. Most clients care more about the click count than the angle on a mouse wheel. Provide that value when needed. Adding a discrete value to the axis event leaves the possibility of defining discrete units for finger/continuous scroll sources in the future. Right now, these will always reuturn 0. Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
Showing
- src/evdev-mt-touchpad-edge-scroll.c 6 additions, 3 deletionssrc/evdev-mt-touchpad-edge-scroll.c
- src/evdev.c 17 additions, 9 deletionssrc/evdev.c
- src/libinput-private.h 2 additions, 1 deletionsrc/libinput-private.h
- src/libinput.c 10 additions, 1 deletionsrc/libinput.c
- src/libinput.h 21 additions, 0 deletionssrc/libinput.h
- src/libinput.sym 1 addition, 0 deletionssrc/libinput.sym
- test/pointer.c 6 additions, 1 deletiontest/pointer.c
Loading
Please register or sign in to comment