}
END_TEST
+START_TEST(touchpad_dwt_modifier_no_dwt)
+{
+ struct litest_device *touchpad = litest_current_device();
+ struct litest_device *keyboard;
+ struct libinput *li = touchpad->libinput;
+ unsigned int modifiers[] = {
+ KEY_LEFTCTRL,
+ KEY_RIGHTCTRL,
+ KEY_LEFTALT,
+ KEY_RIGHTALT,
+ KEY_LEFTSHIFT,
+ KEY_RIGHTSHIFT,
+ KEY_FN,
+ KEY_CAPSLOCK,
+ KEY_TAB,
+ KEY_COMPOSE,
+ KEY_RIGHTMETA,
+ KEY_LEFTMETA,
+ };
+ unsigned int *key;
+
+ if (!has_disable_while_typing(touchpad))
+ return;
+
+ keyboard = dwt_init_paired_keyboard(li, touchpad);
+ litest_disable_tap(touchpad->libinput_device);
+ litest_drain_events(li);
+
+ ARRAY_FOR_EACH(modifiers, key) {
+ litest_keyboard_key(keyboard, *key, true);
+ litest_keyboard_key(keyboard, *key, false);
+ libinput_dispatch(li);
+
+ 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, 1);
+ litest_touch_up(touchpad, 0);
+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
+ }
+
+ litest_delete_device(keyboard);
+}
+END_TEST
+
+START_TEST(touchpad_dwt_fkeys_no_dwt)
+{
+ struct litest_device *touchpad = litest_current_device();
+ struct litest_device *keyboard;
+ struct libinput *li = touchpad->libinput;
+ unsigned int key;
+
+ if (!has_disable_while_typing(touchpad))
+ return;
+
+ keyboard = dwt_init_paired_keyboard(li, touchpad);
+ litest_disable_tap(touchpad->libinput_device);
+ litest_drain_events(li);
+
+ for (key = KEY_F1; key < KEY_CNT; key++) {
+ if (!libinput_device_keyboard_has_key(keyboard->libinput_device,
+ key))
+ continue;
+
+ litest_keyboard_key(keyboard, key, true);
+ litest_keyboard_key(keyboard, key, false);
+ libinput_dispatch(li);
+
+ 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, 1);
+ litest_touch_up(touchpad, 0);
+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
+ }
+
+ litest_delete_device(keyboard);
+}
+END_TEST
+
START_TEST(touchpad_dwt_tap)
{
struct litest_device *touchpad = litest_current_device();
litest_add("touchpad:dwt", touchpad_dwt_key_hold_timeout_existing_touch_cornercase, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:dwt", touchpad_dwt_type, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:dwt", touchpad_dwt_type_short_timeout, LITEST_TOUCHPAD, LITEST_ANY);
+ litest_add("touchpad:dwt", touchpad_dwt_modifier_no_dwt, LITEST_TOUCHPAD, LITEST_ANY);
+ litest_add("touchpad:dwt", touchpad_dwt_fkeys_no_dwt, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:dwt", touchpad_dwt_tap, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:dwt", touchpad_dwt_tap_drag, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:dwt", touchpad_dwt_click, LITEST_TOUCHPAD, LITEST_ANY);