From 4ff6d6e3171713f5168a5dc9ca02702a46797bcb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 May 2020 11:47:29 +1000 Subject: 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 --- test/test-pointer.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'test/test-pointer.c') 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; -- cgit v1.2.1