mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 04:40:09 +01:00
test: make the timeout functions auto-dispatching
The overwhelmingly vast majority of invocations want to have a dispatch before/after, so let's automate that. In case NULL is passed, that dispatch is skipped. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1169>
This commit is contained in:
parent
734ffea934
commit
5a652e5116
12 changed files with 315 additions and 663 deletions
|
|
@ -3180,10 +3180,7 @@ litest_button_click_debounced(struct litest_device *d,
|
|||
bool is_press)
|
||||
{
|
||||
litest_button_click(d, button, is_press);
|
||||
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3195,9 +3192,7 @@ litest_button_scroll(struct litest_device *dev,
|
|||
|
||||
litest_button_click_debounced(dev, li, button, 1);
|
||||
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
litest_event(dev, EV_REL, REL_X, dx);
|
||||
litest_event(dev, EV_REL, REL_Y, dy);
|
||||
|
|
@ -3218,9 +3213,7 @@ litest_button_scroll_locked(struct litest_device *dev,
|
|||
litest_button_click_debounced(dev, li, button, 1);
|
||||
litest_button_click_debounced(dev, li, button, 0);
|
||||
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
litest_event(dev, EV_REL, REL_X, dx);
|
||||
litest_event(dev, EV_REL, REL_Y, dy);
|
||||
|
|
@ -4765,9 +4758,13 @@ litest_assert_touch_cancel(struct libinput *li)
|
|||
}
|
||||
|
||||
void
|
||||
litest_timeout(int millis)
|
||||
_litest_timeout(struct libinput *li, const char *func, int lineno, int millis)
|
||||
{
|
||||
msleep(millis);
|
||||
if (li)
|
||||
_litest_dispatch(li, func, lineno);
|
||||
msleep(millis);
|
||||
if (li)
|
||||
_litest_dispatch(li, func, lineno);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1256,28 +1256,31 @@ litest_create_uinput_abs_device(const char *name,
|
|||
...);
|
||||
|
||||
void
|
||||
litest_timeout(int millis);
|
||||
_litest_timeout(struct libinput *li, const char *func, int lineno, int millis);
|
||||
|
||||
#define litest_timeout_tap() litest_timeout(300)
|
||||
#define litest_timeout_tapndrag() litest_timeout(520)
|
||||
#define litest_timeout_debounce() litest_timeout(30)
|
||||
#define litest_timeout_softbuttons() litest_timeout(300)
|
||||
#define litest_timeout_buttonscroll() litest_timeout(300)
|
||||
#define litest_timeout_wheel_scroll() litest_timeout(600)
|
||||
#define litest_timeout_edgescroll() litest_timeout(300)
|
||||
#define litest_timeout_finger_switch() litest_timeout(140)
|
||||
#define litest_timeout_middlebutton() litest_timeout(70)
|
||||
#define litest_timeout_dwt_short() litest_timeout(220)
|
||||
#define litest_timeout_dwt_long() litest_timeout(520)
|
||||
#define litest_timeout_gesture() litest_timeout(120)
|
||||
#define litest_timeout_gesture_scroll() litest_timeout(180)
|
||||
#define litest_timeout_gesture_hold() litest_timeout(300)
|
||||
#define litest_timeout_gesture_quick_hold() litest_timeout(60)
|
||||
#define litest_timeout_trackpoint() litest_timeout(320)
|
||||
#define litest_timeout_tablet_proxout() litest_timeout(170)
|
||||
#define litest_timeout_touch_arbitration() litest_timeout(100)
|
||||
#define litest_timeout_hysteresis() litest_timeout(90)
|
||||
#define litest_timeout_3fg_drag() litest_timeout(800)
|
||||
#define litest_timeout(li_, millis) \
|
||||
_litest_timeout(li_, __func__, __LINE__, millis)
|
||||
|
||||
#define litest_timeout_tap(li_) litest_timeout(li_, 300)
|
||||
#define litest_timeout_tapndrag(li_) litest_timeout(li_, 520)
|
||||
#define litest_timeout_debounce(li_) litest_timeout(li_, 30)
|
||||
#define litest_timeout_softbuttons(li_) litest_timeout(li_, 300)
|
||||
#define litest_timeout_buttonscroll(li_) litest_timeout(li_, 300)
|
||||
#define litest_timeout_wheel_scroll(li_) litest_timeout(li_, 600)
|
||||
#define litest_timeout_edgescroll(li_) litest_timeout(li_, 300)
|
||||
#define litest_timeout_finger_switch(li_) litest_timeout(li_, 140)
|
||||
#define litest_timeout_middlebutton(li_) litest_timeout(li_, 70)
|
||||
#define litest_timeout_dwt_short(li_) litest_timeout(li_, 220)
|
||||
#define litest_timeout_dwt_long(li_) litest_timeout(li_, 520)
|
||||
#define litest_timeout_gesture(li_) litest_timeout(li_, 120)
|
||||
#define litest_timeout_gesture_scroll(li_) litest_timeout(li_, 180)
|
||||
#define litest_timeout_gesture_hold(li_) litest_timeout(li_, 300)
|
||||
#define litest_timeout_gesture_quick_hold(li_) litest_timeout(li_, 60)
|
||||
#define litest_timeout_trackpoint(li_) litest_timeout(li_, 320)
|
||||
#define litest_timeout_tablet_proxout(li_) litest_timeout(li_, 170)
|
||||
#define litest_timeout_touch_arbitration(li_) litest_timeout(li_, 100)
|
||||
#define litest_timeout_hysteresis(li_) litest_timeout(li_, 90)
|
||||
#define litest_timeout_3fg_drag(li_) litest_timeout(li_, 800)
|
||||
|
||||
void
|
||||
litest_push_event_frame(struct litest_device *dev);
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ START_TEST(device_disable_release_tap)
|
|||
litest_assert_enum_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
|
||||
/* tap happened before suspending, so we still expect the event */
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -621,9 +621,7 @@ START_TEST(device_disable_release_tap_n_drag)
|
|||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
status = libinput_device_config_send_events_set_mode(device,
|
||||
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ test_gesture_swipe_3fg(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
litest_touch_move_three_touches(dev, 40, 40, 50, 40, 60, 40, dir_x,
|
||||
dir_y, 10);
|
||||
|
|
@ -185,7 +185,7 @@ test_gesture_swipe_4fg(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -336,7 +336,7 @@ test_gesture_pinch_2fg(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -447,7 +447,7 @@ test_gesture_pinch_3fg(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -563,7 +563,7 @@ test_gesture_pinch_4fg(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -696,7 +696,7 @@ test_gesture_spread(enum cardinal cardinal, enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 15; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -788,7 +788,7 @@ test_gesture_3fg_buttonarea_scroll(enum hold_gesture_behaviour hold)
|
|||
litest_dispatch(li);
|
||||
|
||||
if (hold == HOLD_GESTURE_REQUIRE)
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
litest_touch_move_two_touches(dev, 40, 20, 30, 20, 0, 40, 10);
|
||||
|
||||
|
|
@ -837,8 +837,7 @@ test_gesture_hold(int nfingers)
|
|||
break;
|
||||
}
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
if (libinput_device_has_capability(dev->libinput_device,
|
||||
LIBINPUT_DEVICE_CAP_GESTURE)) {
|
||||
|
|
@ -902,8 +901,7 @@ test_gesture_hold_cancel(int nfingers)
|
|||
break;
|
||||
}
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
litest_touch_up(dev, last_finger);
|
||||
|
||||
|
|
@ -1593,8 +1591,7 @@ START_TEST(gestures_hold_once_on_double_tap)
|
|||
|
||||
/* First tap, a hold gesture must be generated */
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_quick_hold();
|
||||
litest_timeout_gesture_quick_hold(li);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
|
|
@ -1613,8 +1610,7 @@ START_TEST(gestures_hold_once_on_double_tap)
|
|||
/* Double tap, don't generate an extra hold gesture */
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_quick_hold();
|
||||
litest_timeout_gesture_quick_hold(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -1668,8 +1664,7 @@ START_TEST(gestures_hold_once_tap_n_drag)
|
|||
litest_touch_down(dev, 0, 40, 30);
|
||||
break;
|
||||
}
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_quick_hold();
|
||||
litest_timeout_gesture_quick_hold(li);
|
||||
|
||||
switch (nfingers) {
|
||||
case 3:
|
||||
|
|
@ -1728,9 +1723,8 @@ START_TEST(gestures_hold_and_motion_before_timeout)
|
|||
|
||||
litest_touch_move_to(dev, 0, 50, 50, 51, 51, 1);
|
||||
litest_touch_move_to(dev, 0, 51, 51, 50, 50, 1);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_gesture_quick_hold();
|
||||
litest_timeout_gesture_quick_hold(li);
|
||||
|
||||
litest_drain_events_of_type(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
|
|
@ -1760,8 +1754,7 @@ START_TEST(gestures_hold_and_motion_after_timeout)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_quick_hold();
|
||||
litest_timeout_gesture_quick_hold(li);
|
||||
|
||||
litest_assert_gesture_event(li,
|
||||
LIBINPUT_EVENT_GESTURE_HOLD_BEGIN,
|
||||
|
|
@ -1842,8 +1835,7 @@ START_TEST(gestures_3fg_drag)
|
|||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
}
|
||||
|
|
@ -1909,13 +1901,11 @@ START_TEST(gestures_3fg_drag_lock_resume_3fg_motion)
|
|||
litest_dispatch(li);
|
||||
|
||||
litest_checkpoint("Waiting past finger switch timeout");
|
||||
litest_timeout_finger_switch();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch(li);
|
||||
|
||||
if (wait_for_timeout) {
|
||||
litest_checkpoint("Waiting past tap/3fg drag timeout");
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
||||
|
|
@ -1934,8 +1924,7 @@ START_TEST(gestures_3fg_drag_lock_resume_3fg_motion)
|
|||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
}
|
||||
|
|
@ -2001,13 +1990,11 @@ START_TEST(gestures_3fg_drag_lock_resume_3fg_release_no_motion)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_checkpoint("Waiting past finger switch timeout");
|
||||
litest_timeout_finger_switch();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch(li);
|
||||
|
||||
if (wait_for_timeout) {
|
||||
litest_checkpoint("Waiting past tap/3fg drag timeout");
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
||||
|
|
@ -2027,8 +2014,7 @@ START_TEST(gestures_3fg_drag_lock_resume_3fg_release_no_motion)
|
|||
}
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
|
||||
if (!expect_tap)
|
||||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -2092,8 +2078,7 @@ START_TEST(gestures_3fg_drag_lock_resume_1fg_motion)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
/* We need to wait until the gesture code accepts this is one finger only */
|
||||
litest_timeout_finger_switch();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch(li);
|
||||
|
||||
while (y < 60.0) {
|
||||
y += 2;
|
||||
|
|
@ -2109,8 +2094,7 @@ START_TEST(gestures_3fg_drag_lock_resume_1fg_motion)
|
|||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
@ -2168,8 +2152,7 @@ START_TEST(gestures_3fg_drag_lock_resume_2fg_scroll)
|
|||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_finger_switch();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch(li);
|
||||
|
||||
while (y < 60.0) {
|
||||
y += 2;
|
||||
|
|
@ -2186,8 +2169,7 @@ START_TEST(gestures_3fg_drag_lock_resume_2fg_scroll)
|
|||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
@ -2244,8 +2226,7 @@ START_TEST(gestures_3fg_drag_lock_resume_1fg_tap)
|
|||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_checkpoint("Expecting drag release followed by 1fg tap");
|
||||
|
||||
|
|
@ -2256,8 +2237,7 @@ START_TEST(gestures_3fg_drag_lock_resume_1fg_tap)
|
|||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_3fg_drag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_3fg_drag(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
|||
|
|
@ -365,8 +365,7 @@ START_TEST(event_conversion_gesture)
|
|||
|
||||
litest_touch_down(dev, 0, 70, 30);
|
||||
litest_touch_down(dev, 1, 30, 70);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture_hold();
|
||||
litest_timeout_gesture_hold(li);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
|
|
@ -679,7 +678,7 @@ START_TEST(timer_offset_bug_warning)
|
|||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(NULL);
|
||||
|
||||
user_data->private = &warning_triggered;
|
||||
libinput_log_set_handler(li, timer_offset_warning);
|
||||
|
|
@ -745,9 +744,7 @@ START_TEST(timer_flush)
|
|||
/* make sure tapping works */
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -761,9 +758,7 @@ START_TEST(timer_flush)
|
|||
litest_dispatch(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
/* Ignore 'timer offset negative' warnings */
|
||||
|
|
@ -779,12 +774,10 @@ START_TEST(timer_flush)
|
|||
*/
|
||||
litest_keyboard_key(keyboard, KEY_A, true);
|
||||
litest_keyboard_key(keyboard, KEY_A, false);
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_restore_log_handler(li);
|
||||
|
||||
litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED);
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ START_TEST(pointer_scroll_wheel_inhibit_small_deltas)
|
|||
test_high_and_low_wheel_events_value(dev, REL_WHEEL_HI_RES, -5);
|
||||
|
||||
/* When the scroll timeout is triggered, ignore small deltas again */
|
||||
litest_timeout_wheel_scroll();
|
||||
litest_timeout_wheel_scroll(li);
|
||||
|
||||
litest_event(dev, EV_REL, REL_WHEEL_HI_RES, -15);
|
||||
litest_event(dev, EV_REL, REL_WHEEL_HI_RES, -15);
|
||||
|
|
@ -1497,8 +1497,7 @@ START_TEST(pointer_scroll_button_no_event_before_timeout)
|
|||
}
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
litest_button_click_debounced(device, li, BTN_LEFT, false);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
|
|
@ -1534,9 +1533,7 @@ START_TEST(pointer_scroll_button_middle_emulation)
|
|||
|
||||
litest_button_click(dev, BTN_LEFT, 1);
|
||||
litest_button_click(dev, BTN_RIGHT, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
litest_event(dev, EV_REL, REL_Y, -1);
|
||||
|
|
@ -1625,8 +1622,7 @@ START_TEST(pointer_scroll_button_lock)
|
|||
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
litest_event(dev, EV_REL, REL_X, 1);
|
||||
|
|
@ -1730,9 +1726,7 @@ START_TEST(pointer_scroll_button_lock_enable_while_down)
|
|||
/* but on the next button press we scroll lock */
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, true);
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, false);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
litest_event(dev, EV_REL, REL_X, 1);
|
||||
|
|
@ -1796,9 +1790,7 @@ START_TEST(pointer_scroll_button_lock_enable_while_down_just_lock)
|
|||
/* but on the next button press we scroll lock */
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, true);
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, false);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
litest_event(dev, EV_REL, REL_X, 1);
|
||||
|
|
@ -1839,8 +1831,7 @@ START_TEST(pointer_scroll_button_lock_otherbutton)
|
|||
litest_button_click_debounced(dev, li, BTN_LEFT, true);
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, false);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
/* other button passes on normally */
|
||||
litest_button_click_debounced(dev, li, BTN_RIGHT, true);
|
||||
|
|
@ -1888,7 +1879,7 @@ START_TEST(pointer_scroll_button_lock_enable_while_otherbutton_down)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_button_click_debounced(dev, li, BTN_RIGHT, true);
|
||||
litest_timeout_middlebutton();
|
||||
litest_timeout_middlebutton(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* Enable lock while button is down */
|
||||
|
|
@ -1917,7 +1908,7 @@ START_TEST(pointer_scroll_button_lock_enable_while_otherbutton_down)
|
|||
/* now we should trigger it */
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, true);
|
||||
litest_button_click_debounced(dev, li, BTN_LEFT, false);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_timeout_buttonscroll(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
|
@ -2012,10 +2003,8 @@ START_TEST(pointer_scroll_button_lock_middlebutton)
|
|||
abort();
|
||||
}
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton();
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
/* motion events are the same for all of them */
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
|
@ -2618,7 +2607,7 @@ START_TEST(middlebutton_timeout)
|
|||
litest_drain_events(li);
|
||||
litest_button_click_debounced(device, li, button, true);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_middlebutton();
|
||||
litest_timeout_middlebutton(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -2982,13 +2971,11 @@ START_TEST(middlebutton_button_scrolling)
|
|||
/* middle emulation discards */
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_middlebutton();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton(li);
|
||||
|
||||
/* scroll discards */
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
litest_event(dev, EV_REL, REL_Y, 1);
|
||||
|
|
@ -3177,9 +3164,7 @@ START_TEST(debounce_bounce)
|
|||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_event(dev, EV_KEY, button, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -3192,9 +3177,7 @@ START_TEST(debounce_bounce)
|
|||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_event(dev, EV_KEY, button, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -3231,9 +3214,7 @@ START_TEST(debounce_bounce_high_delay)
|
|||
msleep(15);
|
||||
litest_event(dev, EV_KEY, button, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -3250,9 +3231,7 @@ START_TEST(debounce_bounce_high_delay)
|
|||
msleep(15);
|
||||
litest_event(dev, EV_KEY, button, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -3277,7 +3256,7 @@ START_TEST(debounce_bounce_check_immediate)
|
|||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_debounce();
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* held down & past timeout, we expect releases to be immediate */
|
||||
|
|
@ -3288,7 +3267,7 @@ START_TEST(debounce_bounce_check_immediate)
|
|||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
litest_timeout_debounce();
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -3300,9 +3279,7 @@ debounce_trigger_spurious(struct litest_device *dev, struct libinput *li)
|
|||
{
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -3313,10 +3290,8 @@ debounce_trigger_spurious(struct litest_device *dev, struct libinput *li)
|
|||
litest_dispatch(li);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -3328,9 +3303,7 @@ debounce_trigger_spurious(struct litest_device *dev, struct libinput *li)
|
|||
/* gets filtered now */
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -3356,16 +3329,13 @@ START_TEST(debounce_spurious)
|
|||
for (int i = 0; i < 3; i++) {
|
||||
litest_event(dev, EV_KEY, button, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
/* Not all devices can disable middle button emulation, time out on
|
||||
* middle button here to make sure the initial button press event
|
||||
* was flushed.
|
||||
*/
|
||||
litest_timeout_middlebutton();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -3380,9 +3350,7 @@ START_TEST(debounce_spurious)
|
|||
|
||||
litest_event(dev, EV_KEY, button, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -3411,16 +3379,13 @@ START_TEST(debounce_spurious_multibounce)
|
|||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
/* Not all devices can disable middle button emulation, time out on
|
||||
* middle button here to make sure the initial button press event
|
||||
* was flushed.
|
||||
*/
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -3441,7 +3406,7 @@ START_TEST(debounce_spurious_multibounce)
|
|||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_debounce();
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -3461,9 +3426,7 @@ START_TEST(debounce_spurious_trigger_high_delay)
|
|||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -3488,8 +3451,7 @@ START_TEST(debounce_spurious_trigger_high_delay)
|
|||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -3504,15 +3466,12 @@ START_TEST(debounce_spurious_trigger_high_delay)
|
|||
litest_dispatch(li);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -3536,9 +3495,7 @@ START_TEST(debounce_spurious_dont_enable_on_otherbutton)
|
|||
/* Don't trigger spurious debouncing on otherbutton events */
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
@ -3578,9 +3535,7 @@ START_TEST(debounce_spurious_dont_enable_on_otherbutton)
|
|||
/* Expect release to be immediate */
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
@ -3611,9 +3566,7 @@ START_TEST(debounce_spurious_cancel_debounce_otherbutton)
|
|||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
/* spurious debouncing is on but the release should get flushed by
|
||||
* the other button */
|
||||
|
|
@ -3668,9 +3621,7 @@ START_TEST(debounce_spurious_switch_to_otherbutton)
|
|||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
@ -3725,10 +3676,8 @@ START_TEST(debounce_remove_device_button_up)
|
|||
|
||||
/* delete the device while the timer is still active */
|
||||
litest_delete_device(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_destroy_context(li);
|
||||
}
|
||||
|
|
@ -3750,10 +3699,8 @@ START_TEST(debounce_remove_device_button_down)
|
|||
|
||||
/* delete the device the timer is still active */
|
||||
litest_delete_device(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_debounce();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_debounce(li);
|
||||
|
||||
litest_destroy_context(li);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ START_TEST(switch_disable_touchpad_edge_scroll)
|
|||
|
||||
litest_touch_down(touchpad, 0, 99, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_edgescroll();
|
||||
litest_timeout_edgescroll(li);
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ START_TEST(switch_disable_touchpad_edge_scroll_interrupt)
|
|||
|
||||
litest_touch_down(touchpad, 0, 99, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_edgescroll();
|
||||
litest_timeout_edgescroll(li);
|
||||
litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_axis_events(li, LIBINPUT_EVENT_POINTER_SCROLL_FINGER);
|
||||
|
|
@ -611,7 +611,7 @@ START_TEST(lid_open_on_key_touchpad_enabled)
|
|||
litest_event(keyboard, EV_KEY, KEY_A, 0);
|
||||
litest_event(keyboard, EV_SYN, SYN_REPORT, 0);
|
||||
litest_drain_events(li);
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 70, 10);
|
||||
|
|
|
|||
|
|
@ -388,8 +388,7 @@ START_TEST(tip_up_prox_out)
|
|||
LIBINPUT_TABLET_TOOL_TIP_UP);
|
||||
libinput_event_destroy(event);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
event = libinput_get_event(li);
|
||||
tablet_event = litest_is_tablet_event(event,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
|
|
@ -788,10 +787,7 @@ START_TEST(tip_state_proximity)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
tablet_event = litest_is_tablet_event(event,
|
||||
|
|
@ -1011,10 +1007,7 @@ START_TEST(proximity_in_out)
|
|||
litest_assert(have_tool_update);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
while ((event = libinput_get_event(li))) {
|
||||
if (libinput_event_get_type(event) ==
|
||||
|
|
@ -1085,10 +1078,7 @@ START_TEST(proximity_out_button_up)
|
|||
litest_tablet_proximity_out(dev);
|
||||
litest_event(dev, EV_KEY, button, 0);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_assert_tablet_button_event(li,
|
||||
button,
|
||||
|
|
@ -1134,9 +1124,7 @@ START_TEST(proximity_out_clear_buttons)
|
|||
litest_event(dev, EV_KEY, *button, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
litest_assert_notnull(event);
|
||||
|
|
@ -1269,10 +1257,7 @@ START_TEST(proximity_has_axes)
|
|||
|
||||
/* Make sure that the axes are still present on proximity out */
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_drain_events_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_TIP);
|
||||
|
||||
|
|
@ -1402,9 +1387,7 @@ START_TEST(proximity_range_in_out)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_MOUSE, 0);
|
||||
litest_unfilter_event(dev, EV_KEY, BTN_TOOL_PEN);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1443,9 +1426,7 @@ START_TEST(proximity_range_button_click)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_MOUSE, 0);
|
||||
litest_unfilter_event(dev, EV_KEY, BTN_TOOL_PEN);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1496,9 +1477,7 @@ START_TEST(proximity_range_button_press)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_MOUSE, 0);
|
||||
litest_unfilter_event(dev, EV_KEY, BTN_TOOL_PEN);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1549,9 +1528,7 @@ START_TEST(proximity_range_button_release)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_MOUSE, 0);
|
||||
litest_unfilter_event(dev, EV_KEY, BTN_TOOL_PEN);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
}
|
||||
|
|
@ -1570,8 +1547,7 @@ START_TEST(proximity_out_slow_event)
|
|||
litest_tablet_motion(dev, 12, 12, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* The forced prox out */
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
|
|
@ -1597,8 +1573,7 @@ START_TEST(proximity_out_not_during_contact)
|
|||
litest_tablet_motion(dev, 12, 12, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* No forced proxout yet */
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1607,8 +1582,7 @@ START_TEST(proximity_out_not_during_contact)
|
|||
litest_tablet_motion(dev, 14, 14, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* The forced prox out */
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
|
|
@ -1639,8 +1613,7 @@ START_TEST(proximity_out_not_during_buttonpress)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* No forced proxout yet */
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1651,8 +1624,7 @@ START_TEST(proximity_out_not_during_buttonpress)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* The forced prox out */
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
|
|
@ -1683,8 +1655,7 @@ START_TEST(proximity_out_disables_forced)
|
|||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_tablet_proximity_out(dev);
|
||||
|
|
@ -1710,8 +1681,7 @@ START_TEST(proximity_out_disables_forced_after_forced)
|
|||
litest_drain_events(li);
|
||||
|
||||
/* timeout-based forced prox out */
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1726,8 +1696,7 @@ START_TEST(proximity_out_disables_forced_after_forced)
|
|||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_tablet_proximity_out(dev);
|
||||
|
|
@ -1911,8 +1880,7 @@ START_TEST(left_handed)
|
|||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_drain_events(li);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* Since we've drained the events and libinput's aware the tool is out
|
||||
* of proximity, it should have finally transitioned into left-handed
|
||||
|
|
@ -2322,8 +2290,7 @@ START_TEST(bad_distance_events)
|
|||
|
||||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
absinfo = libevdev_get_abs_info(dev->evdev, ABS_DISTANCE);
|
||||
|
|
@ -2916,8 +2883,7 @@ START_TEST(tool_type)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
x++;
|
||||
|
|
@ -2980,10 +2946,7 @@ START_TEST(tool_in_prox_before_start)
|
|||
litest_button_click(dev, BTN_STYLUS, false);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
litest_is_tablet_event(event, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
|
|
@ -3096,9 +3059,7 @@ START_TEST(tool_direct_switch_skip_tool_update)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_RUBBER, 0);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
tev = litest_is_tablet_event(event,
|
||||
|
|
@ -3155,14 +3116,11 @@ START_TEST(tool_direct_switch_with_forced_proxout)
|
|||
libinput_event_destroy(event);
|
||||
|
||||
/* pen forced prox out */
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* actual prox out for tablets that don't do forced prox out */
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
litest_is_proximity_event(event,
|
||||
|
|
@ -3799,8 +3757,7 @@ START_TEST(tablet_calibration_set_matrix_delta)
|
|||
dy = libinput_event_tablet_tool_get_y(tablet_event) - y;
|
||||
libinput_event_destroy(event);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -3881,14 +3838,10 @@ START_TEST(tablet_calibration_set_matrix)
|
|||
litest_assert_double_lt(y, 100.0);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_tablet_proximity_in(dev, 50, 50, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_drain_events(li);
|
||||
|
|
@ -3915,9 +3868,7 @@ START_TEST(tablet_calibration_set_matrix)
|
|||
litest_assert(y < 51.0);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
@ -4116,9 +4067,7 @@ START_TEST(tablet_area_set_rectangle)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
get_tool_xy(li, &x, &y);
|
||||
litest_assert_double_eq_epsilon(x, final_stop, 1);
|
||||
litest_assert_double_eq_epsilon(y, final_stop, 1);
|
||||
|
|
@ -4153,9 +4102,7 @@ START_TEST(tablet_area_set_rectangle_move_outside)
|
|||
/* move in/out of prox outside the area */
|
||||
litest_tablet_proximity_in(dev, 5, 5, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
x = 5;
|
||||
|
|
@ -4195,9 +4142,7 @@ START_TEST(tablet_area_set_rectangle_move_outside)
|
|||
litest_tablet_tip_up(dev, x, y, axes);
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -4244,9 +4189,7 @@ START_TEST(tablet_area_set_rectangle_move_outside_to_inside)
|
|||
litest_axis_set_value(axes, ABS_PRESSURE, 0);
|
||||
litest_tablet_tip_up(dev, x, y, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
y = 5;
|
||||
|
|
@ -4264,9 +4207,7 @@ START_TEST(tablet_area_set_rectangle_move_outside_to_inside)
|
|||
litest_axis_set_value(axes, ABS_PRESSURE, 0);
|
||||
litest_tablet_tip_up(dev, x, y, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -4300,9 +4241,7 @@ START_TEST(tablet_area_set_rectangle_move_in_margin)
|
|||
/* move in/out of prox outside the area but within the margin */
|
||||
litest_tablet_proximity_in(dev, 24, 24, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
ev = libinput_get_event(li);
|
||||
tev = litest_is_proximity_event(ev, LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN);
|
||||
|
|
@ -4351,9 +4290,7 @@ START_TEST(tablet_area_set_rectangle_while_outside)
|
|||
litest_checkpoint("Proximity in + out outside tablet area");
|
||||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_dispatch(li);
|
||||
|
||||
|
|
@ -4369,9 +4306,7 @@ START_TEST(tablet_area_set_rectangle_while_outside)
|
|||
litest_tablet_proximity_in(dev, 11, 11, axes);
|
||||
litest_tablet_motion(dev, 12, 12, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
ev = libinput_get_event(li);
|
||||
tev = litest_is_proximity_event(ev, LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN);
|
||||
|
|
@ -4432,8 +4367,7 @@ START_TEST(tablet_pressure_offset_set)
|
|||
assert_pressure(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, 0.20);
|
||||
assert_pressure(li, LIBINPUT_EVENT_TABLET_TOOL_TIP, 0.20);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
}
|
||||
}
|
||||
|
|
@ -4506,8 +4440,7 @@ START_TEST(tablet_pressure_offset_decrease)
|
|||
/* offset 20 on prox in */
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* offset 15 on prox in - this one is so we trigger on the next prox
|
||||
|
|
@ -4515,16 +4448,14 @@ START_TEST(tablet_pressure_offset_decrease)
|
|||
litest_axis_set_value(axes, ABS_PRESSURE, 15);
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* a reduced pressure value must reduce the offset */
|
||||
litest_axis_set_value(axes, ABS_PRESSURE, 10);
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
|
|
@ -4579,15 +4510,14 @@ START_TEST(tablet_pressure_offset_increase)
|
|||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* offset 25 on second prox in - must not change the offset */
|
||||
litest_axis_set_value(axes, ABS_PRESSURE, 25);
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* offset 30 on third prox in - must not change the offset */
|
||||
|
|
@ -4794,8 +4724,7 @@ START_TEST(tablet_pressure_config_set_minimum)
|
|||
}
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* 10% hw value is below our thresholds, so logical zero */
|
||||
|
|
@ -4883,9 +4812,7 @@ START_TEST(tablet_pressure_config_set_maximum)
|
|||
}
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_axis_set_value(axes, ABS_PRESSURE, 10);
|
||||
litest_tablet_proximity_in(dev, 70, 70, axes);
|
||||
|
|
@ -4981,8 +4908,7 @@ START_TEST(tablet_pressure_config_set_range)
|
|||
}
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_tablet_proximity_in(dev, 70, 70, axes);
|
||||
|
|
@ -5042,9 +4968,7 @@ START_TEST(tablet_pressure_offset_exceed_threshold)
|
|||
for (int i = 0; i < 2; i++) {
|
||||
litest_tablet_proximity_in(dev, 5, 100, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5172,8 +5096,7 @@ START_TEST(tablet_pressure_across_multiple_tablets)
|
|||
litest_dispatch(li);
|
||||
}
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_assert_tablet_proximity_event(li, LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN);
|
||||
litest_assert_tablet_tip_event(li, LIBINPUT_TABLET_TOOL_TIP_DOWN);
|
||||
|
|
@ -5273,9 +5196,7 @@ START_TEST(tablet_pressure_after_unplug)
|
|||
|
||||
litest_checkpoint("Putting out of proximity");
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li, LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
|
||||
litest_delete_device(dev);
|
||||
|
|
@ -5951,21 +5872,18 @@ assert_touch_is_arbitrated(struct litest_device *dev, struct litest_device *fing
|
|||
litest_assert_only_typed_events(li,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_AXIS);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_only_typed_events(li,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
|
||||
litest_timeout_touch_arbitration();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_touch_arbitration(li);
|
||||
|
||||
/* finger still down */
|
||||
litest_touch_move_to(finger, 0, 80, 80, 30, 30, 10);
|
||||
litest_touch_up(finger, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_touch_arbitration();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_touch_arbitration(li);
|
||||
|
||||
/* lift finger, expect expect events */
|
||||
litest_touch_down(finger, 0, 30, 30);
|
||||
|
|
@ -6036,9 +5954,7 @@ START_TEST(touch_arbitration_outside_rect)
|
|||
/* disable prox-out timer quirk */
|
||||
litest_tablet_proximity_in(dev, x, y - 1, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_tablet_proximity_in(dev, x, y - 1, axes);
|
||||
litest_drain_events(li);
|
||||
|
|
@ -6070,8 +5986,7 @@ START_TEST(touch_arbitration_outside_rect)
|
|||
x = 20;
|
||||
y = 10;
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_tablet_motion(dev, x, y, axes);
|
||||
litest_tablet_proximity_in(dev, x, y - 1, axes);
|
||||
litest_drain_events(li);
|
||||
|
|
@ -6118,9 +6033,7 @@ START_TEST(touch_arbitration_remove_after)
|
|||
litest_touch_down(finger, 0, 70, 70);
|
||||
litest_drain_events(li);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
/* Delete the device immediately after the tablet goes out of prox.
|
||||
* This merely tests that the arbitration timer gets cleaned up */
|
||||
|
|
@ -6155,8 +6068,7 @@ START_TEST(touch_arbitration_stop_touch)
|
|||
/* disable prox-out timer quirk */
|
||||
litest_tablet_proximity_in(dev, 30, 30, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(finger, 0, 30, 30);
|
||||
|
|
@ -6187,7 +6099,7 @@ START_TEST(touch_arbitration_stop_touch)
|
|||
litest_tablet_proximity_out(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* Finger needs to be lifted for events to happen*/
|
||||
|
|
@ -6267,8 +6179,7 @@ START_TEST(touch_arbitration_suspend_touch_device)
|
|||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED);
|
||||
|
||||
litest_timeout_touch_arbitration();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_touch_arbitration(li);
|
||||
|
||||
litest_touch_down(dev, 0, 30, 30);
|
||||
litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10);
|
||||
|
|
@ -6373,8 +6284,7 @@ START_TEST(touch_arbitration_remove_tablet)
|
|||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED);
|
||||
|
||||
litest_timeout_touch_arbitration();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_touch_arbitration(li);
|
||||
|
||||
/* Touch is still down, don't enable */
|
||||
litest_touch_move_to(dev, 0, 80, 80, 30, 30, 10);
|
||||
|
|
@ -6419,7 +6329,7 @@ START_TEST(touch_arbitration_keep_ignoring)
|
|||
|
||||
litest_tablet_proximity_out(tablet);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* a touch during pen interaction stays a palm after the pen lifts.
|
||||
|
|
@ -6475,9 +6385,7 @@ START_TEST(touch_arbitration_late_touch_lift)
|
|||
*/
|
||||
litest_touch_down(finger, 0, 30, 30);
|
||||
litest_touch_up(finger, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
|
|
@ -6576,8 +6484,7 @@ verify_left_handed_tablet_sequence(struct litest_device *tablet,
|
|||
litest_drain_events(li);
|
||||
verify_left_handed_tablet_motion(tablet, li, x, y, left_handed);
|
||||
litest_tablet_proximity_out(tablet);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
}
|
||||
|
||||
|
|
@ -6822,8 +6729,7 @@ START_TEST(tablet_rotation_left_handed_while_in_prox)
|
|||
#endif
|
||||
litest_checkpoint("Moving out of proximity");
|
||||
litest_tablet_proximity_out(tablet);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -7044,8 +6950,7 @@ START_TEST(huion_static_btn_tool_pen)
|
|||
LIBINPUT_EVENT_TABLET_TOOL_AXIS);
|
||||
|
||||
/* Wait past the timeout to expect a proximity out */
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_dispatch(li);
|
||||
|
|
@ -7067,8 +6972,7 @@ START_TEST(huion_static_btn_tool_pen)
|
|||
}
|
||||
litest_assert_only_typed_events(li,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_AXIS);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
litest_dispatch(li);
|
||||
|
|
@ -7108,7 +7012,7 @@ START_TEST(huion_static_btn_tool_pen_no_timeout_during_usage)
|
|||
}
|
||||
litest_assert_only_typed_events(li,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_AXIS);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_dispatch(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
|
|
@ -7148,8 +7052,7 @@ START_TEST(huion_static_btn_tool_pen_disable_quirk_on_prox_out)
|
|||
|
||||
/* Wait past the timeout to expect a proximity out */
|
||||
if (with_timeout) {
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_assert_tablet_proximity_event(li,
|
||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||
}
|
||||
|
|
@ -7180,9 +7083,7 @@ START_TEST(huion_static_btn_tool_pen_disable_quirk_on_prox_out)
|
|||
litest_assert_only_typed_events(li,
|
||||
LIBINPUT_EVENT_TABLET_TOOL_AXIS);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
|
|
@ -7243,9 +7144,7 @@ START_TEST(tablet_smoothing)
|
|||
}
|
||||
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tablet_proxout(li);
|
||||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_dispatch(li);
|
||||
litest_drain_events(li);
|
||||
|
|
|
|||
|
|
@ -1482,9 +1482,7 @@ START_TEST(clickpad_softbutton_left_1st_fg_move)
|
|||
|
||||
/* move out of the area, then wait for softbutton timer */
|
||||
litest_touch_move_to(dev, 0, 20, 90, 50, 50, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* move down left, expect motion */
|
||||
|
|
@ -1821,9 +1819,7 @@ START_TEST(clickpad_topsoftbuttons_move_out_leftclick_before_timeout)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 80, 5);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20);
|
||||
|
|
@ -1855,15 +1851,11 @@ START_TEST(clickpad_topsoftbuttons_move_out_leftclick)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 80, 5);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_softbuttons(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ START_TEST(touchpad_1fg_tap)
|
|||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -154,11 +154,9 @@ START_TEST(touchpad_doubletap)
|
|||
litest_touch_up(dev, 0);
|
||||
break;
|
||||
}
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_dispatch(li);
|
||||
event = libinput_get_event(li);
|
||||
ptrev = litest_is_button_event(event,
|
||||
button,
|
||||
|
|
@ -259,8 +257,7 @@ START_TEST(touchpad_multitap)
|
|||
msleep(10);
|
||||
}
|
||||
|
||||
litest_timeout_tapndrag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag(li);
|
||||
|
||||
for (ntaps = 0; ntaps <= range; ntaps++) {
|
||||
event = libinput_get_event(li);
|
||||
|
|
@ -280,7 +277,7 @@ START_TEST(touchpad_multitap)
|
|||
litest_assert_int_ge(curtime, oldtime);
|
||||
oldtime = curtime;
|
||||
}
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -384,8 +381,7 @@ START_TEST(touchpad_multitap_n_drag_move)
|
|||
LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -501,8 +497,7 @@ START_TEST(touchpad_multitap_n_drag_2fg)
|
|||
|
||||
litest_touch_up(dev, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -607,7 +602,7 @@ START_TEST(touchpad_multitap_n_drag_click)
|
|||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
@ -677,9 +672,7 @@ START_TEST(touchpad_multitap_timeout)
|
|||
msleep(10);
|
||||
}
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag(li);
|
||||
|
||||
for (ntaps = 0; ntaps <= range; ntaps++) {
|
||||
event = libinput_get_event(li);
|
||||
|
|
@ -769,10 +762,8 @@ START_TEST(touchpad_multitap_n_drag_timeout)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps < range; ntaps++) {
|
||||
event = libinput_get_event(li);
|
||||
|
|
@ -807,8 +798,7 @@ START_TEST(touchpad_multitap_n_drag_timeout)
|
|||
LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -900,8 +890,7 @@ START_TEST(touchpad_multitap_n_drag_high_delay)
|
|||
LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -976,10 +965,7 @@ START_TEST(touchpad_multitap_n_drag_tap)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps < range; ntaps++) {
|
||||
event = libinput_get_event(li);
|
||||
|
|
@ -1091,10 +1077,7 @@ START_TEST(touchpad_multitap_n_drag_tap_click)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps < range; ntaps++) {
|
||||
event = libinput_get_event(li);
|
||||
|
|
@ -1306,7 +1289,7 @@ START_TEST(touchpad_tap_n_drag_draglock)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -1560,17 +1543,14 @@ START_TEST(touchpad_tap_n_drag_draglock_timeout)
|
|||
break;
|
||||
}
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -1631,17 +1611,15 @@ START_TEST(touchpad_tap_n_drag_draglock_sticky)
|
|||
break;
|
||||
}
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tapndrag();
|
||||
litest_timeout_tapndrag(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
|
|
@ -1714,9 +1692,7 @@ START_TEST(touchpad_tap_n_drag_2fg)
|
|||
break;
|
||||
}
|
||||
litest_touch_down(dev, 0, 30, 70);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_down(dev, 1, 80, 70);
|
||||
litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10);
|
||||
litest_dispatch(li);
|
||||
|
|
@ -1963,9 +1939,7 @@ START_TEST(touchpad_tap_n_drag_3fg_btntool)
|
|||
break;
|
||||
}
|
||||
litest_touch_down(dev, 0, 30, 70);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_down(dev, 1, 80, 90);
|
||||
litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5);
|
||||
litest_dispatch(li);
|
||||
|
|
@ -2056,9 +2030,7 @@ START_TEST(touchpad_tap_n_drag_3fg)
|
|||
}
|
||||
/* 1fg down triggers the drag */
|
||||
litest_touch_down(dev, 0, 30, 70);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
/* 2fg is allowed now without cancelling the drag */
|
||||
litest_touch_down(dev, 1, 80, 90);
|
||||
litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10);
|
||||
|
|
@ -2308,9 +2280,7 @@ START_TEST(touchpad_2fg_tap)
|
|||
litest_touch_up(dev, 0);
|
||||
litest_touch_up(dev, 1);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
ev = libinput_get_event(li);
|
||||
ptrev = litest_is_button_event(ev,
|
||||
|
|
@ -2364,9 +2334,7 @@ START_TEST(touchpad_2fg_tap_inverted)
|
|||
litest_touch_up(dev, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
ev = libinput_get_event(li);
|
||||
ptrev = litest_is_button_event(ev,
|
||||
|
|
@ -2435,7 +2403,7 @@ START_TEST(touchpad_2fg_tap_n_hold_first)
|
|||
litest_dispatch(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
@ -2457,7 +2425,7 @@ START_TEST(touchpad_2fg_tap_n_hold_second)
|
|||
litest_dispatch(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
@ -2486,7 +2454,7 @@ START_TEST(touchpad_2fg_tap_quickrelease)
|
|||
|
||||
litest_assert_button_event(li, BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -2512,10 +2480,7 @@ START_TEST(touchpad_1fg_tap_click)
|
|||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -2662,9 +2627,7 @@ START_TEST(touchpad_no_2fg_tap_after_timeout)
|
|||
-> no event
|
||||
*/
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(dev->libinput);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(dev->libinput);
|
||||
litest_timeout_tap(li);
|
||||
litest_drain_events(dev->libinput);
|
||||
|
||||
litest_touch_down(dev, 1, 70, 50);
|
||||
|
|
@ -2908,9 +2871,7 @@ START_TEST(touchpad_3fg_tap)
|
|||
litest_touch_up(dev, (i + 1) % 3);
|
||||
litest_touch_up(dev, (i + 0) % 3);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
ev = libinput_get_event(li);
|
||||
ptrev = litest_is_button_event(ev,
|
||||
|
|
@ -2963,9 +2924,7 @@ START_TEST(touchpad_3fg_tap_tap_again)
|
|||
litest_touch_up(dev, 1);
|
||||
litest_touch_up(dev, 2);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
ev = libinput_get_event(li);
|
||||
|
|
@ -3015,7 +2974,7 @@ START_TEST(touchpad_3fg_tap_quickrelease)
|
|||
|
||||
litest_assert_button_event(li, BTN_MIDDLE,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, BTN_MIDDLE,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -3047,10 +3006,8 @@ START_TEST(touchpad_3fg_tap_pressure_btntool)
|
|||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_down(dev, 1, 70, 50);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* drop below the pressure threshold in the same frame as starting a
|
||||
|
|
@ -3072,9 +3029,7 @@ START_TEST(touchpad_3fg_tap_pressure_btntool)
|
|||
|
||||
litest_touch_up(dev, 0);
|
||||
litest_touch_up(dev, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_MIDDLE,
|
||||
|
|
@ -3181,7 +3136,7 @@ START_TEST(touchpad_3fg_tap_btntool)
|
|||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -3233,7 +3188,7 @@ START_TEST(touchpad_3fg_tap_btntool_inverted)
|
|||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -3288,7 +3243,7 @@ START_TEST(touchpad_3fg_tap_btntool_pointerjump)
|
|||
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -3377,8 +3332,7 @@ START_TEST(touchpad_3fg_tap_slot_release_btntool)
|
|||
litest_event(dev, EV_KEY, BTN_TOUCH, 0);
|
||||
litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_MIDDLE,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -3409,8 +3363,7 @@ START_TEST(touchpad_3fg_tap_after_scroll)
|
|||
litest_touch_move_two_touches(dev, 40, 20, 50, 20, 0, 20, 10);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
/* third finger tap without the other two fingers moving */
|
||||
litest_touch_down(dev, 2, 60, 40);
|
||||
|
|
@ -3418,8 +3371,7 @@ START_TEST(touchpad_3fg_tap_after_scroll)
|
|||
litest_touch_up(dev, 2);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
@ -3452,7 +3404,7 @@ START_TEST(touchpad_4fg_tap)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
}
|
||||
|
|
@ -3489,7 +3441,7 @@ START_TEST(touchpad_4fg_tap_quickrelease)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -3557,9 +3509,7 @@ START_TEST(touchpad_move_after_touch)
|
|||
litest_touch_up(dev, 0);
|
||||
break;
|
||||
}
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_no_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
}
|
||||
|
|
@ -3594,7 +3544,7 @@ START_TEST(touchpad_5fg_tap)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
}
|
||||
|
|
@ -3634,7 +3584,7 @@ START_TEST(touchpad_5fg_tap_quickrelease)
|
|||
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -3656,10 +3606,7 @@ START_TEST(clickpad_1fg_tap_click)
|
|||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -3861,7 +3808,7 @@ START_TEST(touchpad_tap_map_delayed)
|
|||
litest_assert_button_event(li,
|
||||
BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li, BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
|
|
@ -4361,9 +4308,7 @@ START_TEST(touchpad_tap_palm_on_touch_hold_timeout)
|
|||
/* Finger down is palm after tap timeout */
|
||||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
|
|
@ -4474,9 +4419,7 @@ START_TEST(touchpad_tap_palm_on_tapped)
|
|||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -4556,9 +4499,7 @@ START_TEST(touchpad_tap_palm_on_tapped_palm_down)
|
|||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -4679,10 +4620,8 @@ START_TEST(touchpad_tap_palm_on_tapped_doubletap)
|
|||
litest_touch_up(dev, 1);
|
||||
break;
|
||||
}
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
|
|
@ -4766,9 +4705,7 @@ START_TEST(touchpad_tap_palm_on_drag)
|
|||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_dispatch(li);
|
||||
|
|
@ -4852,9 +4789,7 @@ START_TEST(touchpad_tap_palm_on_drag_2fg)
|
|||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
litest_touch_down(dev, this, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_down(dev, other, 60, 50);
|
||||
litest_dispatch(li);
|
||||
|
||||
|
|
@ -4907,7 +4842,7 @@ START_TEST(touchpad_tap_palm_on_touch_2)
|
|||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -4952,7 +4887,7 @@ START_TEST(touchpad_tap_palm_on_touch_2_retouch)
|
|||
litest_assert_button_event(li,
|
||||
BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -4999,7 +4934,7 @@ START_TEST(touchpad_tap_palm_on_touch_3)
|
|||
litest_assert_button_event(li,
|
||||
BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -5035,8 +4970,7 @@ START_TEST(touchpad_tap_palm_on_touch_3_retouch)
|
|||
litest_touch_down(dev, (this + 1) % 3, 60, 50);
|
||||
litest_touch_down(dev, (this + 2) % 3, 70, 50);
|
||||
litest_drain_events(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, this);
|
||||
|
|
@ -5051,7 +4985,7 @@ START_TEST(touchpad_tap_palm_on_touch_3_retouch)
|
|||
litest_assert_button_event(li,
|
||||
BTN_MIDDLE,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_MIDDLE,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -5168,9 +5102,8 @@ START_TEST(touchpad_tap_palm_after_tap)
|
|||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
button,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -5248,9 +5181,7 @@ START_TEST(touchpad_tap_palm_multitap)
|
|||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps <= range; ntaps++) {
|
||||
litest_assert_button_event(li,
|
||||
|
|
@ -5333,9 +5264,7 @@ START_TEST(touchpad_tap_palm_multitap_timeout)
|
|||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps <= range; ntaps++) {
|
||||
litest_assert_button_event(li,
|
||||
|
|
@ -5449,8 +5378,7 @@ START_TEST(touchpad_tap_palm_multitap_down_again)
|
|||
msleep(10);
|
||||
}
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
for (ntaps = 0; ntaps <= 2 * range + 1; ntaps++) {
|
||||
litest_assert_button_event(li,
|
||||
|
|
@ -5597,9 +5525,7 @@ START_TEST(touchpad_tap_palm_click_then_tap)
|
|||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -5641,8 +5567,7 @@ START_TEST(touchpad_tap_palm_dwt_tap)
|
|||
|
||||
litest_keyboard_key(keyboard, KEY_B, false);
|
||||
litest_drain_events(li);
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
/* Changes to palm after dwt timeout */
|
||||
litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1);
|
||||
|
|
|
|||
|
|
@ -124,9 +124,7 @@ test_2fg_scroll(struct litest_device *dev, double dx, double dy, bool want_sleep
|
|||
|
||||
/* Avoid a small scroll being seen as a tap */
|
||||
if (want_sleep) {
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
}
|
||||
|
||||
litest_touch_up(dev, 1);
|
||||
|
|
@ -534,7 +532,7 @@ START_TEST(touchpad_2fg_scroll_return_to_motion)
|
|||
litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5);
|
||||
litest_touch_up(dev, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch();
|
||||
litest_timeout_finger_switch(li);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_axis_events(li, LIBINPUT_EVENT_POINTER_SCROLL_FINGER);
|
||||
|
||||
|
|
@ -546,7 +544,7 @@ START_TEST(touchpad_2fg_scroll_return_to_motion)
|
|||
litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_finger_switch();
|
||||
litest_timeout_finger_switch(li);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_axis_events(li, LIBINPUT_EVENT_POINTER_SCROLL_FINGER);
|
||||
|
||||
|
|
@ -910,14 +908,14 @@ START_TEST(touchpad_edge_scroll_timeout)
|
|||
* the scroll threshold of 2mm */
|
||||
litest_touch_down(dev, 0, 99, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_hysteresis();
|
||||
litest_timeout_hysteresis(li);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_touch_move_to(dev, 0, 99, 20, 99, 20 + mm/2, 8);
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_edgescroll();
|
||||
litest_timeout_edgescroll(li);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1531,9 +1529,7 @@ START_TEST(touchpad_palm_detect_no_tap_top_edge)
|
|||
|
||||
litest_touch_down(dev, 0, 50, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1552,30 +1548,22 @@ START_TEST(touchpad_palm_detect_tap_hardbuttons)
|
|||
|
||||
litest_touch_down(dev, 0, 95, 5);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 5, 5);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 5, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 95, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1597,25 +1585,19 @@ START_TEST(touchpad_palm_detect_tap_softbuttons)
|
|||
* the palm detection edge zone -> expect palm detection */
|
||||
litest_touch_down(dev, 0, 99, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 1, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* Two touches in the software button area, but
|
||||
* not in the palm detection edge zone -> expect taps */
|
||||
litest_touch_down(dev, 0, 10, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -1626,9 +1608,7 @@ START_TEST(touchpad_palm_detect_tap_softbuttons)
|
|||
|
||||
litest_touch_down(dev, 0, 90, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
|
@ -1656,30 +1636,22 @@ START_TEST(touchpad_palm_detect_tap_clickfinger)
|
|||
* inside the palm detection edge zone*/
|
||||
litest_touch_down(dev, 0, 95, 5);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 5, 5);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 5, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 95, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1822,15 +1794,13 @@ START_TEST(touchpad_palm_detect_tool_palm_tap_after)
|
|||
litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_pop_event_frame(dev);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
|
@ -1858,8 +1828,7 @@ START_TEST(touchpad_palm_detect_tool_palm_tap)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
@ -1925,15 +1894,13 @@ START_TEST(touchpad_palm_detect_pressure_late_tap)
|
|||
litest_touch_down(dev, 0, 50, 80);
|
||||
litest_touch_move_extended(dev, 0, 51, 99, axes);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* make sure normal tap still works */
|
||||
litest_touch_down(dev, 0, 50, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1957,9 +1924,7 @@ START_TEST(touchpad_palm_detect_pressure_tap_hold)
|
|||
|
||||
/* event in state HOLD is thumb */
|
||||
litest_touch_down(dev, 0, 50, 99);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_move_extended(dev, 0, 51, 99, axes);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -1967,8 +1932,7 @@ START_TEST(touchpad_palm_detect_pressure_tap_hold)
|
|||
/* make sure normal tap still works */
|
||||
litest_touch_down(dev, 0, 50, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -1992,9 +1956,7 @@ START_TEST(touchpad_palm_detect_pressure_tap_hold_2ndfg)
|
|||
|
||||
/* event in state HOLD is thumb */
|
||||
litest_touch_down(dev, 0, 50, 99);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_move_extended(dev, 0, 51, 99, axes);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -2007,17 +1969,14 @@ START_TEST(touchpad_palm_detect_pressure_tap_hold_2ndfg)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
/* timeout -> into HOLD, no event on release */
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
litest_touch_up(dev, 1);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* make sure normal tap still works */
|
||||
litest_touch_down(dev, 0, 50, 99);
|
||||
litest_touch_up(dev, 0);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
}
|
||||
END_TEST
|
||||
|
|
@ -2049,8 +2008,7 @@ START_TEST(touchpad_palm_detect_move_and_tap)
|
|||
/* thumb is resting, check if tapping still works */
|
||||
litest_touch_down(dev, 1, 50, 50);
|
||||
litest_touch_up(dev, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_LEFT,
|
||||
|
|
@ -2169,8 +2127,7 @@ START_TEST(touchpad_palm_detect_pressure_after_dwt)
|
|||
litest_touch_move_to_extended(touchpad, 0, 50, 50, 20, 50, axes, 20);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* after dwt timeout, pressure blocks events */
|
||||
|
|
@ -2537,10 +2494,7 @@ START_TEST(touchpad_left_handed_tapping)
|
|||
|
||||
litest_touch_down(dev, 0, 50, 50);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
/* Tapping is unaffected by left-handed setting */
|
||||
litest_assert_button_event(li,
|
||||
|
|
@ -2574,10 +2528,7 @@ START_TEST(touchpad_left_handed_tapping_2fg)
|
|||
litest_touch_down(dev, 1, 70, 50);
|
||||
litest_touch_up(dev, 1);
|
||||
litest_touch_up(dev, 0);
|
||||
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
/* Tapping is unaffected by left-handed setting */
|
||||
litest_assert_button_event(li,
|
||||
|
|
@ -2617,9 +2568,7 @@ START_TEST(touchpad_left_handed_delayed)
|
|||
|
||||
/* left-handed takes effect now */
|
||||
litest_button_click(dev, BTN_RIGHT, 1);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_middlebutton(li);
|
||||
litest_button_click(dev, BTN_LEFT, 1);
|
||||
litest_dispatch(li);
|
||||
|
||||
|
|
@ -3400,9 +3349,7 @@ START_TEST(touchpad_trackpoint_mb_scroll)
|
|||
|
||||
litest_drain_events(li);
|
||||
litest_button_click(touchpad, BTN_2, true); /* middle */
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_buttonscroll(li);
|
||||
litest_event(trackpoint, EV_REL, REL_Y, -2);
|
||||
litest_event(trackpoint, EV_SYN, SYN_REPORT, 0);
|
||||
litest_event(trackpoint, EV_REL, REL_Y, -2);
|
||||
|
|
@ -3814,8 +3761,7 @@ START_TEST(touchpad_dwt)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
/* after timeout - motion events*/
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
|
|
@ -3856,8 +3802,7 @@ START_TEST(touchpad_dwt_ext_and_int_keyboard)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
/* after timeout - motion events*/
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
|
|
@ -3897,8 +3842,7 @@ START_TEST(touchpad_dwt_enable_touch)
|
|||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
/* same touch after timeout - motion events*/
|
||||
litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 10);
|
||||
|
|
@ -3938,8 +3882,7 @@ START_TEST(touchpad_dwt_touch_hold)
|
|||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
/* touch still down - no events */
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_touch_move_to(touchpad, 0, 30, 50, 50, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
|
@ -3993,8 +3936,7 @@ START_TEST(touchpad_dwt_key_hold_timeout)
|
|||
litest_keyboard_key(keyboard, KEY_A, true);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
|
|
@ -4010,8 +3952,7 @@ START_TEST(touchpad_dwt_key_hold_timeout)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
/* expire timeout */
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
|
|
@ -4043,8 +3984,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch_cornercase)
|
|||
litest_keyboard_key(keyboard, KEY_A, true);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
/* Touch starting after re-issuing the dwt timeout */
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
|
|
@ -4065,7 +4005,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch_cornercase)
|
|||
* This is buggy behavior and not what a user would typically
|
||||
* expect. But it's hard to trigger in real life too.
|
||||
*/
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
/* If the below check for motion event fails because no events are
|
||||
|
|
@ -4096,9 +4036,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch)
|
|||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
|
|
@ -4109,7 +4047,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch)
|
|||
litest_assert_empty_queue(li);
|
||||
|
||||
/* expire timeout, but touch started before release */
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
|
@ -4146,8 +4084,7 @@ START_TEST(touchpad_dwt_type)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
|
|
@ -4185,8 +4122,7 @@ START_TEST(touchpad_dwt_type_short_timeout)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
|
|
@ -4277,8 +4213,7 @@ START_TEST(touchpad_dwt_shift_combo_triggers_dwt)
|
|||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
|
|
@ -4378,8 +4313,7 @@ START_TEST(touchpad_dwt_modifier_combo_dwt_after)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
}
|
||||
|
||||
litest_delete_device(keyboard);
|
||||
|
|
@ -4437,8 +4371,7 @@ START_TEST(touchpad_dwt_modifier_combo_dwt_remains)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
}
|
||||
|
||||
litest_delete_device(keyboard);
|
||||
|
|
@ -4503,7 +4436,7 @@ START_TEST(touchpad_dwt_tap)
|
|||
litest_keyboard_key(keyboard, KEY_A, false);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
|
|
@ -4537,8 +4470,7 @@ START_TEST(touchpad_dwt_tap_drag)
|
|||
litest_keyboard_key(keyboard, KEY_A, false);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
|
@ -4600,9 +4532,7 @@ START_TEST(touchpad_dwt_edge_scroll)
|
|||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_touch_down(touchpad, 0, 99, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_edgescroll();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_edgescroll(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
/* edge scroll timeout is 300ms atm, make sure we don't accidentally
|
||||
|
|
@ -4640,8 +4570,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt)
|
|||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(touchpad, 0, 99, 20);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_edgescroll();
|
||||
litest_timeout_edgescroll(li);
|
||||
litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10);
|
||||
litest_dispatch(li);
|
||||
litest_assert_only_axis_events(li, LIBINPUT_EVENT_POINTER_SCROLL_FINGER);
|
||||
|
|
@ -4660,7 +4589,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt)
|
|||
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY);
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
/* Known bad behavior: a touch starting to edge-scroll before dwt
|
||||
* kicks in will stop to scroll but be recognized as normal
|
||||
|
|
@ -4863,8 +4792,7 @@ START_TEST(touchpad_dwt_disable_during_touch)
|
|||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_long();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long(li);
|
||||
|
||||
disable_dwt(touchpad);
|
||||
|
||||
|
|
@ -4936,8 +4864,7 @@ START_TEST(touchpad_dwt_disable_during_key_release)
|
|||
|
||||
/* touch down during timeout, wait, should generate events */
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
|
|
@ -4969,8 +4896,7 @@ START_TEST(touchpad_dwt_disable_during_key_hold)
|
|||
|
||||
/* touch down during timeout, wait, should generate events */
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_dwt_long();
|
||||
litest_timeout_dwt_long(li);
|
||||
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
|
|
@ -5069,9 +4995,7 @@ START_TEST(touchpad_dwt_enable_during_tap)
|
|||
enable_dwt(touchpad);
|
||||
litest_dispatch(li);
|
||||
litest_touch_up(touchpad, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_timeout_tap(li);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
|
||||
litest_touch_down(touchpad, 0, 50, 50);
|
||||
|
|
@ -5211,7 +5135,7 @@ START_TEST(touchpad_dwt_multiple_keyboards)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
litest_keyboard_key(k2, KEY_A, true);
|
||||
litest_keyboard_key(k2, KEY_A, false);
|
||||
|
|
@ -5222,7 +5146,7 @@ START_TEST(touchpad_dwt_multiple_keyboards)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
litest_delete_device(k1);
|
||||
litest_delete_device(k2);
|
||||
|
|
@ -5333,7 +5257,7 @@ START_TEST(touchpad_dwt_multiple_keyboards_remove)
|
|||
litest_keyboard_key(keyboards[1], KEY_B, false);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_timeout_dwt_short(li);
|
||||
|
||||
removed = keyboards[which % 2];
|
||||
remained = keyboards[(which + 1) % 2];
|
||||
|
|
@ -5840,7 +5764,7 @@ START_TEST(touchpad_slot_swap)
|
|||
start[first][1] + 30,
|
||||
50, 21, 10);
|
||||
litest_dispatch(li);
|
||||
litest_timeout_gesture();
|
||||
litest_timeout_gesture(li);
|
||||
litest_dispatch(li);
|
||||
/* drain a potential scroll stop */
|
||||
litest_drain_events(li);
|
||||
|
|
@ -6379,8 +6303,7 @@ START_TEST(touchpad_pressure_tap_2fg_1fg_light)
|
|||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
libinput_event_destroy(event);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
event = libinput_get_event(li);
|
||||
litest_is_button_event(event,
|
||||
|
|
@ -6443,10 +6366,8 @@ START_TEST(touchpad_pressure_btntool)
|
|||
litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1);
|
||||
litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_assert_button_event(li,
|
||||
BTN_MIDDLE,
|
||||
|
|
@ -6746,7 +6667,7 @@ START_TEST(touchpad_palm_detect_touch_size_after_dwt)
|
|||
litest_touch_move_to_extended(touchpad, 0, 50, 50, 20, 50, axes, 20);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_dwt_short();
|
||||
litest_timeout_dwt_short(li);
|
||||
litest_dispatch(li);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
|
|
@ -7234,8 +7155,7 @@ START_TEST(touchpad_end_start_touch)
|
|||
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_tap();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_tap(li);
|
||||
|
||||
litest_touch_move_to(dev, 0, 50.2, 50.2, 50, 70, 10);
|
||||
litest_touch_up(dev, 0);
|
||||
|
|
|
|||
|
|
@ -355,8 +355,7 @@ START_TEST(trackpoint_palmdetect)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_trackpoint();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_trackpoint(li);
|
||||
|
||||
litest_touch_down(touchpad, 0, 30, 30);
|
||||
litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10);
|
||||
|
|
@ -425,8 +424,7 @@ START_TEST(trackpoint_palmdetect_resume_touch)
|
|||
litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_timeout_trackpoint();
|
||||
litest_dispatch(li);
|
||||
litest_timeout_trackpoint(li);
|
||||
|
||||
/* touch started after last tp event, expect resume */
|
||||
litest_touch_move_to(touchpad, 0, 80, 80, 30, 30, 10);
|
||||
|
|
@ -494,7 +492,7 @@ START_TEST(trackpoint_palmdetect_require_min_events_timeout)
|
|||
litest_touch_up(touchpad, 0);
|
||||
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||
|
||||
litest_timeout_trackpoint();
|
||||
litest_timeout_trackpoint(li);
|
||||
}
|
||||
|
||||
litest_delete_device(touchpad);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue