Skip to content
Snippets Groups Projects
Commit 1daa1a11 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent c35885e8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment