mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-06 05:38:04 +02:00
test: move finger position to test for right button down
On large touchpads with resolution, 90% of the touchpad may be north of the button. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
fa67be9e3c
commit
74a8d6546e
1 changed files with 8 additions and 8 deletions
|
|
@ -422,7 +422,7 @@ START_TEST(touchpad_clickfinger_to_area_method)
|
||||||
|
|
||||||
enable_buttonareas(dev);
|
enable_buttonareas(dev);
|
||||||
|
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
@ -440,7 +440,7 @@ START_TEST(touchpad_clickfinger_to_area_method)
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
/* use bottom right corner to catch accidental softbutton right */
|
/* use bottom right corner to catch accidental softbutton right */
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
@ -465,7 +465,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down)
|
||||||
|
|
||||||
enable_buttonareas(dev);
|
enable_buttonareas(dev);
|
||||||
|
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
libinput_dispatch(li);
|
libinput_dispatch(li);
|
||||||
|
|
@ -485,7 +485,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down)
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
/* use bottom right corner to catch accidental softbutton right */
|
/* use bottom right corner to catch accidental softbutton right */
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
@ -511,7 +511,7 @@ START_TEST(touchpad_area_to_clickfinger_method)
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
/* use bottom right corner to catch accidental softbutton right */
|
/* use bottom right corner to catch accidental softbutton right */
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
@ -526,7 +526,7 @@ START_TEST(touchpad_area_to_clickfinger_method)
|
||||||
|
|
||||||
enable_buttonareas(dev);
|
enable_buttonareas(dev);
|
||||||
|
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
@ -552,7 +552,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down)
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
/* use bottom right corner to catch accidental softbutton right */
|
/* use bottom right corner to catch accidental softbutton right */
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_assert_button_event(li, BTN_LEFT,
|
litest_assert_button_event(li, BTN_LEFT,
|
||||||
|
|
@ -568,7 +568,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down)
|
||||||
litest_assert_button_event(li, BTN_LEFT,
|
litest_assert_button_event(li, BTN_LEFT,
|
||||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||||
|
|
||||||
litest_touch_down(dev, 0, 90, 90);
|
litest_touch_down(dev, 0, 95, 95);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue