evdev: if a device's rotation is around 180 degrees, flip the wheel
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 18 Apr 2023 06:53:05 +0000 (16:53 +1000)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 4 Dec 2023 10:23:27 +0000 (19:23 +0900)
commit0fa64da432bc311877a0f12d9222119ae624f943
tree0ea11edcb183a13ffb6eadef23466b35bcd684e6
parent282d0a985069331695a845ee40b57b054e3f2266
evdev: if a device's rotation is around 180 degrees, flip the wheel

For a device used upside-down, make sure the wheels correspond to the
new physical directions. There's a grace range of 20 degrees either way
since that seems like it makes sense.

For 90 degree rotation (or 270 degree) the wheel is left as-is, the
heuristics to guess what angle we want in this case is not clear enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doc/user/configuration.rst
src/evdev-wheel.c
test/test-pointer.c