mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-31 18:10:08 +01:00
test: filter out edge-scroll-only touchpads from 2fg scroll tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
be857f1e28
commit
f2aefb9942
1 changed files with 18 additions and 0 deletions
|
|
@ -182,6 +182,9 @@ START_TEST(touchpad_2fg_scroll)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
test_2fg_scroll(dev, 0.1, 40, 0);
|
||||
|
|
@ -208,6 +211,9 @@ START_TEST(touchpad_2fg_scroll_slow_distance)
|
|||
const struct input_absinfo *y;
|
||||
double y_move;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
/* We want to move > 5 mm. */
|
||||
y = libevdev_get_abs_info(dev->evdev, ABS_Y);
|
||||
if (y->resolution) {
|
||||
|
|
@ -261,6 +267,9 @@ START_TEST(touchpad_2fg_scroll_source)
|
|||
struct libinput_event *event;
|
||||
struct libinput_event_pointer *ptrev;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
test_2fg_scroll(dev, 0, 30, 0);
|
||||
|
|
@ -282,6 +291,9 @@ START_TEST(touchpad_2fg_scroll_semi_mt)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 20, 20);
|
||||
|
|
@ -302,6 +314,9 @@ START_TEST(touchpad_2fg_scroll_return_to_motion)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
/* start with motion */
|
||||
|
|
@ -369,6 +384,9 @@ START_TEST(touchpad_scroll_natural)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue