evdev: implement support for the MOUSE_WHEEL_CLICK_COUNT property
Not all mice have a click angle with integer degrees. The new MOUSE_WHEEL_CLICK_COUNT property specifies how many clicks per full rotation, the angle can be calculated from that. See https://github.com/systemd/systemd/pull/4440 for more information CLICK_COUNT overrides CLICK_ANGLE, so we check for the former first and then fall back to the angle if need be. No changes to the user-facing API. Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
Showing
- src/evdev.c 43 additions, 8 deletionssrc/evdev.c
- src/libinput-private.h 1 addition, 1 deletionsrc/libinput-private.h
- src/libinput-util.c 32 additions, 0 deletionssrc/libinput-util.c
- src/libinput-util.h 1 addition, 0 deletionssrc/libinput-util.h
- test/Makefile.am 1 addition, 0 deletionstest/Makefile.am
- test/litest-device-mouse-wheel-click-count.c 77 additions, 0 deletionstest/litest-device-mouse-wheel-click-count.c
- test/litest.c 2 additions, 0 deletionstest/litest.c
- test/litest.h 1 addition, 0 deletionstest/litest.h
- test/misc.c 30 additions, 0 deletionstest/misc.c
- test/pointer.c 41 additions, 8 deletionstest/pointer.c
Loading
Please register or sign in to comment