]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: add MOUSE_WHEEL_CLICK_COUNT for non-integer click angles (#4440)
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 21 Oct 2016 10:31:32 +0000 (20:31 +1000)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Oct 2016 10:31:32 +0000 (12:31 +0200)
MOUSE_WHEEL_CLICK_ANGLE has been an integer, and at least libinput (probably
the only user) parses it as strict integer. For backwards compatibility, we
cannot change it to a decimal number now.

Add a new property to list the number of clicks for a full 360 degree
rotation, to be specified in addition to the old click angle property. Clients
can prefer the new one where available and calculate the decimal value to
whatever precision they want.

hwdb/70-mouse.hwdb
hwdb/parse_hwdb.py

index 56e36af0e52b72af388f78b9510c2236d8fbfbe8..bf3d134c461baf9d95f5aa461bbb8123222032b4 100644 (file)
@@ -48,6 +48,8 @@
 #    MOUSE_DPI
 #    MOUSE_WHEEL_CLICK_ANGLE
 #    MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL
+#    MOUSE_WHEEL_CLICK_COUNT
+#    MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL
 #
 #########################################
 #         ID_INPUT_TRACKBALL            #
 #     MOUSE_WHEEL_CLICK_ANGLE=<degrees>
 #
 # Most mice have a 15 degree click stop (24 clicks per full rotation).
+# For backwards-compatibility, the click angle must be an integer.
+# Where a device has non-integer click angles, the MOUSE_WHEEL_CLICK_COUNT
+# property should also be specified.
 #
 #########################################
 #   MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL  #
 # This property may only be specified if the angle for the horizontal
 # scroll wheel differs from the vertical wheel. If so, *both* click angles
 # must be specified.
+#
+#########################################
+#   MOUSE_WHEEL_CLICK_COUNT             #
+#   MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL  #
+#########################################
+#
+# The number of clicks the wheel sends per 360 degree rotation. This
+# property should only be used where the click angle is not an integer.
+# For backwards compatibility it must be specified in addition to
+# MOUSE_WHEEL_CLICK_ANGLE.
+# Clients should prefer MOUSE_WHEEL_CLICK_COUNT where available, it is more
+# precise than MOUSE_WHEEL_CLICK_ANGLE.
+#
+# MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL works the same way but also follows the
+# rules of MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL.
 
 #
 # Sort by brand, type (usb, bluetooth), DPI, frequency.
@@ -361,6 +381,8 @@ mouse:usb:v046dp4041:name:Logitech MX Master:
  MOUSE_DPI=1000@166
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
+ MOUSE_WHEEL_CLICK_COUNT=24
+ MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL=14
 
 # Logitech MK260 Wireless Combo Receiver aka M-R0011
 mouse:usb:v046dpc52e:name:Logitech USB Receiver:
index e163edbc51d11f0627effd5d01885d29b63ac364..2540c8c2f639dd309e9e475d20fccf2b1ab5debc 100755 (executable)
@@ -91,6 +91,8 @@ def property_grammar():
     props = (('MOUSE_DPI', Group(OneOrMore(setting('SETTINGS*')))),
              ('MOUSE_WHEEL_CLICK_ANGLE', INTEGER),
              ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER),
+             ('MOUSE_WHEEL_CLICK_COUNT', INTEGER),
+             ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
              ('ID_INPUT_TRACKBALL', Literal('1')),
              ('POINTINGSTICK_SENSITIVITY', INTEGER),
              ('POINTINGSTICK_CONST_ACCEL', REAL),