diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-05-18 11:47:29 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-05-21 07:29:44 +0000 |
commit | 4ff6d6e3171713f5168a5dc9ca02702a46797bcb (patch) | |
tree | 43708d098ffbbaee61eb49a820219c7570d8ef6c /test/test-pointer.c | |
parent | 152837f44a5863c68000d13ec89dc51631acc5d4 (diff) | |
download | libinput-4ff6d6e3171713f5168a5dc9ca02702a46797bcb.tar.gz |
Deprecate wheel tilt as separate axis source
This has never been supported through the stack. No device ever had the
required MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL udev property set, so
libinput never set the right axis source. Neither weston nor mutter
added the code for it. Even if we added wheel tilt for devices now, it
would break those devices. And the benefit we get from having those
separate is miniscule at best.
So let's do the long-term thing and just deprecate this axis source.
The wheel tilt mouse test device remains in the test suite, with the
udev properties set just to verify that we do indeed ignore those now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-pointer.c')
-rw-r--r-- | test/test-pointer.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/test/test-pointer.c b/test/test-pointer.c index f1482642..22a8bfb7 100644 --- a/test/test-pointer.c +++ b/test/test-pointer.c @@ -602,33 +602,6 @@ out: return angle; } -static enum libinput_pointer_axis_source -wheel_source(struct litest_device *dev, int which) -{ - struct udev_device *d; - bool is_tilt = false; - - d = libinput_device_get_udev_device(dev->libinput_device); - litest_assert_ptr_notnull(d); - - switch(which) { - case REL_WHEEL: - is_tilt = !!udev_device_get_property_value(d, "MOUSE_WHEEL_TILT_VERTICAL"); - break; - case REL_HWHEEL: - is_tilt = !!udev_device_get_property_value(d, "MOUSE_WHEEL_TILT_HORIZONTAL"); - break; - default: - litest_abort_msg("Invalid source axis %d\n", which); - break; - } - - udev_device_unref(d); - return is_tilt ? - LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT : - LIBINPUT_POINTER_AXIS_SOURCE_WHEEL; -} - static void test_wheel_event(struct litest_device *dev, int which, int amount) { @@ -641,7 +614,7 @@ test_wheel_event(struct litest_device *dev, int which, int amount) double scroll_step, expected, discrete; scroll_step = wheel_click_angle(dev, which); - source = wheel_source(dev, which); + source = LIBINPUT_POINTER_AXIS_SOURCE_WHEEL; expected = amount * scroll_step; discrete = amount; |