diff --git a/include/linux/input.h b/include/linux/input.h index 39b550b5..2ac46630 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -8,13 +8,11 @@ #ifndef _INPUT_H #define _INPUT_H - #include #include #include #include - /* * The event structure itself */ @@ -835,7 +833,6 @@ struct input_keymap_entry { #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ - #define ABS_MAX 0x3f #define ABS_CNT (ABS_MAX+1) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 12f80234..fc79b0fc 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -667,8 +667,8 @@ tp_init_buttons(struct tp_dispatch *tp, log_bug_kernel(libinput, "%s: clickpad advertising right button\n", device->devname); - } else { - if (!tp->buttons.is_clickpad) + } else if (libevdev_has_event_code(device->evdev, EV_KEY, BTN_LEFT) && + !tp->buttons.is_clickpad) { log_bug_kernel(libinput, "%s: non clickpad without right button?\n", device->devname); diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 33c6da64..228eb842 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -688,8 +688,15 @@ tp_tap_config_is_enabled(struct libinput_device *device) } static enum libinput_config_tap_state -tp_tap_config_get_default(struct libinput_device *device) +tp_tap_default(struct evdev_device *evdev) { + /** + * If we don't have a left button we must have tapping enabled by + * default. + */ + if (!libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_LEFT)) + return LIBINPUT_CONFIG_TAP_ENABLED; + /** * Tapping is disabled by default for two reasons: * * if you don't know that tapping is a thing (or enabled by @@ -702,6 +709,14 @@ tp_tap_config_get_default(struct libinput_device *device) return LIBINPUT_CONFIG_TAP_DISABLED; } +static enum libinput_config_tap_state +tp_tap_config_get_default(struct libinput_device *device) +{ + struct evdev_device *evdev = (struct evdev_device *)device; + + return tp_tap_default(evdev); +} + int tp_init_tap(struct tp_dispatch *tp) { @@ -712,6 +727,7 @@ tp_init_tap(struct tp_dispatch *tp) tp->device->base.config.tap = &tp->tap.config; tp->tap.state = TAP_STATE_IDLE; + tp->tap.enabled = tp_tap_default(tp->device); libinput_timer_init(&tp->tap.timer, tp->device->base.seat->libinput, diff --git a/src/filter-private.h b/src/filter-private.h index dcce1259..f0d35b40 100644 --- a/src/filter-private.h +++ b/src/filter-private.h @@ -41,5 +41,4 @@ struct motion_filter { struct motion_filter_interface *interface; }; - #endif diff --git a/src/filter.h b/src/filter.h index bffeb5f9..9f6223d2 100644 --- a/src/filter.h +++ b/src/filter.h @@ -58,7 +58,6 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter, struct motion_filter * create_pointer_accelerator_filter(accel_profile_func_t filter); - /* * Pointer acceleration profiles. */ diff --git a/test/Makefile.am b/test/Makefile.am index 220575f2..2875d295 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -32,6 +32,7 @@ liblitest_la_SOURCES = \ litest-wacom-intuos-tablet.c \ litest-wacom-isdv4-tablet.c \ litest-wacom-touch.c \ + litest-wacom-intuos-finger.c \ litest-xen-virtual-pointer.c \ litest-vmware-virtual-usb-mouse.c \ litest.c diff --git a/test/device.c b/test/device.c index a54c310f..9f5766dd 100644 --- a/test/device.c +++ b/test/device.c @@ -64,14 +64,19 @@ START_TEST(device_sendevents_config_touchpad) { struct litest_device *dev = litest_current_device(); struct libinput_device *device; - uint32_t modes; + uint32_t modes, expected; + + expected = LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; + + /* The wacom devices in the test suite are external */ + if (libevdev_get_id_vendor(dev->evdev) != 0x56a) /* wacom */ + expected |= + LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE; device = dev->libinput_device; modes = libinput_device_config_send_events_get_modes(device); - ck_assert_int_eq(modes, - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE| - LIBINPUT_CONFIG_SEND_EVENTS_DISABLED); + ck_assert_int_eq(modes, expected); } END_TEST @@ -82,6 +87,10 @@ START_TEST(device_sendevents_config_touchpad_superset) enum libinput_config_status status; uint32_t modes; + /* The wacom devices in the test suite are external */ + if (libevdev_get_id_vendor(dev->evdev) == 0x56a) /* wacom */ + return; + device = dev->libinput_device; modes = LIBINPUT_CONFIG_SEND_EVENTS_DISABLED | diff --git a/test/litest-alps-semi-mt.c b/test/litest-alps-semi-mt.c index 4d95ac90..7c8eedc2 100644 --- a/test/litest-alps-semi-mt.c +++ b/test/litest-alps-semi-mt.c @@ -31,7 +31,6 @@ #include "litest.h" #include "litest-int.h" - static void alps_create(struct litest_device *d); static void diff --git a/test/litest-wacom-intuos-finger.c b/test/litest-wacom-intuos-finger.c new file mode 100644 index 00000000..7310cbd7 --- /dev/null +++ b/test/litest-wacom-intuos-finger.c @@ -0,0 +1,103 @@ +/* + * Copyright © 2014 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include "litest.h" +#include "litest-int.h" + +static void +litest_wacom_finger_setup(void) +{ + struct litest_device *d = litest_create_device(LITEST_WACOM_FINGER); + litest_set_current_device(d); +} + +static struct input_event down[] = { + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct input_event move[] = { + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct litest_device_interface interface = { + .touch_down_events = down, + .touch_move_events = move, +}; + +static struct input_absinfo absinfo[] = { + { ABS_X, 0, 4096, 0, 0, 18 }, + { ABS_Y, 0, 4096, 0, 0, 29 }, + { ABS_MT_SLOT, 0, 15, 0, 0, 0 }, + { ABS_MT_TOUCH_MAJOR, 0, 4096, 0, 0, 0 }, + { ABS_MT_TOUCH_MINOR, 0, 4096, 0, 0, 0 }, + { ABS_MT_POSITION_X, 0, 4096, 0, 0, 18 }, + { ABS_MT_POSITION_Y, 0, 4096, 0, 0, 29 }, + { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, + { .value = -1 }, +}; + +static struct input_id input_id = { + .bustype = 0x3, + .vendor = 0x56a, + .product = 0x27, +}; + +static int events[] = { + EV_KEY, BTN_TOOL_FINGER, + EV_KEY, BTN_TOOL_QUINTTAP, + EV_KEY, BTN_TOUCH, + EV_KEY, BTN_TOOL_DOUBLETAP, + EV_KEY, BTN_TOOL_TRIPLETAP, + EV_KEY, BTN_TOOL_QUADTAP, + INPUT_PROP_MAX, INPUT_PROP_POINTER, + -1, -1, +}; + +struct litest_test_device litest_wacom_finger_device = { + .type = LITEST_WACOM_FINGER, + .features = LITEST_TOUCHPAD, + .shortname = "wacom-finger", + .setup = litest_wacom_finger_setup, + .interface = &interface, + + .name = "Wacom Intuos5 touch M Finger", + .id = &input_id, + .events = events, + .absinfo = absinfo, +}; diff --git a/test/litest.c b/test/litest.c index 263e9b81..9119ac0c 100644 --- a/test/litest.c +++ b/test/litest.c @@ -101,6 +101,7 @@ extern struct litest_test_device litest_vmware_virtmouse_device; extern struct litest_test_device litest_synaptics_hover_device; extern struct litest_test_device litest_synaptics_carbon3rd_device; extern struct litest_test_device litest_protocol_a_screen; +extern struct litest_test_device litest_wacom_finger_device; struct litest_test_device* devices[] = { &litest_synaptics_clickpad_device, @@ -123,6 +124,7 @@ struct litest_test_device* devices[] = { &litest_synaptics_hover_device, &litest_synaptics_carbon3rd_device, &litest_protocol_a_screen, + &litest_wacom_finger_device, NULL, }; diff --git a/test/litest.h b/test/litest.h index 4fbffd7a..07738007 100644 --- a/test/litest.h +++ b/test/litest.h @@ -52,10 +52,11 @@ enum litest_device_type { LITEST_SYNAPTICS_HOVER_SEMI_MT = -16, LITEST_SYNAPTICS_TRACKPOINT_BUTTONS = -17, LITEST_PROTOCOL_A_SCREEN = -18, - LITEST_WACOM_BAMBOO = -19, - LITEST_WACOM_CINTIQ = -20, - LITEST_WACOM_INTUOS = -21, - LITEST_WACOM_ISDV4 = -22, + LITEST_WACOM_FINGER = -19, + LITEST_WACOM_BAMBOO = -20, + LITEST_WACOM_CINTIQ = -21, + LITEST_WACOM_INTUOS = -22, + LITEST_WACOM_ISDV4 = -23, }; enum litest_device_feature { diff --git a/test/path.c b/test/path.c index 243edd79..64c5d7f4 100644 --- a/test/path.c +++ b/test/path.c @@ -1,4 +1,3 @@ - /* * Copyright © 2013 Red Hat, Inc. * diff --git a/test/touch.c b/test/touch.c index 2d918b2d..ac97c52b 100644 --- a/test/touch.c +++ b/test/touch.c @@ -343,7 +343,6 @@ START_TEST(touch_calibration_rotation) } #undef almost_equal - libinput_event_destroy(ev); litest_drain_events(li); } diff --git a/test/touchpad.c b/test/touchpad.c index b70d3732..8077f8e3 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -38,6 +38,9 @@ START_TEST(touchpad_1fg_motion) struct libinput_event *event; struct libinput_event_pointer *ptrev; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); @@ -68,6 +71,9 @@ START_TEST(touchpad_2fg_no_motion) struct libinput *li = dev->libinput; struct libinput_event *event; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + litest_drain_events(li); litest_touch_down(dev, 0, 20, 20); @@ -225,6 +231,10 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool) struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; + if (libevdev_get_abs_maximum(dev->evdev, + ABS_MT_SLOT) > 2) + return; + libinput_device_config_tap_set_enabled(dev->libinput_device, LIBINPUT_CONFIG_TAP_ENABLED); @@ -262,6 +272,49 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool) } END_TEST +START_TEST(touchpad_2fg_tap_n_drag_3fg) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + + if (libevdev_get_abs_maximum(dev->evdev, + ABS_MT_SLOT) <= 2) + return; + + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + + litest_drain_events(li); + + litest_touch_down(dev, 0, 30, 70); + litest_touch_up(dev, 0); + litest_touch_down(dev, 0, 30, 70); + litest_touch_down(dev, 1, 80, 90); + litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5, 40); + libinput_dispatch(li); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_PRESSED); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + /* Putting down a third finger should end the drag */ + litest_touch_down(dev, 2, 50, 50); + + libinput_dispatch(li); + + litest_assert_button_event(li, BTN_LEFT, + LIBINPUT_BUTTON_STATE_RELEASED); + + /* Releasing the fingers should not cause any events */ + litest_touch_up(dev, 2); + litest_touch_up(dev, 1); + litest_touch_up(dev, 0); + + litest_assert_empty_queue(li); +} +END_TEST + START_TEST(touchpad_2fg_tap) { struct litest_device *dev = litest_current_device(); @@ -455,6 +508,8 @@ START_TEST(touchpad_no_2fg_tap_after_move) struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); litest_drain_events(dev->libinput); /* one finger down, move past threshold, @@ -477,6 +532,8 @@ START_TEST(touchpad_no_2fg_tap_after_timeout) struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); litest_drain_events(dev->libinput); /* one finger down, wait past tap timeout, @@ -502,6 +559,9 @@ START_TEST(touchpad_no_first_fg_tap_after_move) struct libinput *li = dev->libinput; struct libinput_event *event; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_ENABLED); + litest_drain_events(dev->libinput); /* one finger down, second finger down, @@ -612,6 +672,10 @@ START_TEST(touchpad_3fg_tap) struct libinput_event *event; int i; + if (libevdev_get_abs_maximum(dev->evdev, + ABS_MT_SLOT) <= 2) + return; + libinput_device_config_tap_set_enabled(dev->libinput_device, LIBINPUT_CONFIG_TAP_ENABLED); @@ -647,6 +711,10 @@ START_TEST(touchpad_3fg_tap_btntool) struct libinput *li = dev->libinput; struct libinput_event *event; + if (libevdev_get_abs_maximum(dev->evdev, + ABS_MT_SLOT) > 2) + return; + libinput_device_config_tap_set_enabled(dev->libinput_device, 1); litest_drain_events(li); @@ -682,6 +750,10 @@ START_TEST(touchpad_3fg_tap_btntool_inverted) struct libinput *li = dev->libinput; struct libinput_event *event; + if (libevdev_get_abs_maximum(dev->evdev, + ABS_MT_SLOT) > 2) + return; + libinput_device_config_tap_set_enabled(dev->libinput_device, 1); litest_drain_events(li); @@ -1797,8 +1869,8 @@ START_TEST(touchpad_2fg_scroll_slow_distance) litest_touch_down(dev, 0, 20, 30); litest_touch_down(dev, 1, 40, 30); - litest_touch_move_to(dev, 0, 20, 30, 20, 50, 60, 10); - litest_touch_move_to(dev, 1, 40, 30, 40, 50, 60, 10); + litest_touch_move_to(dev, 0, 20, 30, 20, 40, 70, 10); + litest_touch_move_to(dev, 1, 40, 30, 40, 40, 70, 10); litest_touch_up(dev, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2097,8 +2169,6 @@ START_TEST(touchpad_tap_is_available) struct litest_device *dev = litest_current_device(); ck_assert_int_ge(libinput_device_config_tap_get_finger_count(dev->libinput_device), 1); - ck_assert_int_eq(libinput_device_config_tap_get_enabled(dev->libinput_device), - LIBINPUT_CONFIG_TAP_DISABLED); } END_TEST @@ -2115,15 +2185,28 @@ START_TEST(touchpad_tap_is_not_available) } END_TEST -START_TEST(touchpad_tap_default) +START_TEST(touchpad_tap_default_disabled) { struct litest_device *dev = litest_current_device(); + /* this test is only run on specific devices */ + ck_assert_int_eq(libinput_device_config_tap_get_default_enabled(dev->libinput_device), LIBINPUT_CONFIG_TAP_DISABLED); } END_TEST +START_TEST(touchpad_tap_default_enabled) +{ + struct litest_device *dev = litest_current_device(); + + /* this test is only run on specific devices */ + + ck_assert_int_eq(libinput_device_config_tap_get_default_enabled(dev->libinput_device), + LIBINPUT_CONFIG_TAP_ENABLED); +} +END_TEST + START_TEST(touchpad_tap_invalid) { struct litest_device *dev = litest_current_device(); @@ -2157,6 +2240,9 @@ START_TEST(touchpad_palm_detect_at_edge) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); @@ -2179,6 +2265,9 @@ START_TEST(touchpad_palm_detect_at_bottom_corners) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + /* Run for non-clickpads only: make sure the bottom corners trigger palm detection too */ litest_drain_events(li); @@ -2203,6 +2292,9 @@ START_TEST(touchpad_palm_detect_at_top_corners) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + /* Run for non-clickpads only: make sure the bottom corners trigger palm detection too */ litest_drain_events(li); @@ -2227,6 +2319,9 @@ START_TEST(touchpad_palm_detect_palm_stays_palm) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + litest_drain_events(li); litest_touch_down(dev, 0, 99, 20); @@ -2244,6 +2339,9 @@ START_TEST(touchpad_palm_detect_palm_becomes_pointer) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); @@ -2266,6 +2364,9 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges) if (!touchpad_has_palm_detect_size(dev)) return; + libinput_device_config_tap_set_enabled(dev->libinput_device, + LIBINPUT_CONFIG_TAP_DISABLED); + /* moving non-palm into the edge does not label it as palm */ litest_drain_events(li); @@ -3254,27 +3355,28 @@ int main(int argc, char **argv) { litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_timeout, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_2fg_tap_n_drag, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_2fg_tap_n_drag_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_APPLE_CLICKPAD); + litest_add("touchpad:tap", touchpad_2fg_tap_n_drag_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_2fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_2fg_tap_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - litest_add("touchpad:tap", touchpad_1fg_tap_click, LITEST_TOUCHPAD, LITEST_CLICKPAD); - litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); + litest_add("touchpad:tap", touchpad_1fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); + litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD); litest_add("touchpad:tap", touchpad_2fg_tap_click_apple, LITEST_APPLE_CLICKPAD, LITEST_ANY); - litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); + litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT); litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - /* apple is the only one with real 3-finger support */ - litest_add("touchpad:tap", touchpad_3fg_tap_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_APPLE_CLICKPAD); - litest_add("touchpad:tap", touchpad_3fg_tap_btntool_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_APPLE_CLICKPAD); - litest_add("touchpad:tap", touchpad_3fg_tap, LITEST_APPLE_CLICKPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_3fg_tap_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:tap", touchpad_3fg_tap_btntool_inverted, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add("touchpad:tap", touchpad_3fg_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); /* Real buttons don't interfere with tapping, so don't run those for pads with buttons */ litest_add("touchpad:tap", touchpad_1fg_double_tap_click, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_1fg_tap_n_drag_click, LITEST_CLICKPAD, LITEST_ANY); - litest_add("touchpad:tap", touchpad_tap_default, LITEST_TOUCHPAD, LITEST_ANY); + litest_add("touchpad:tap", touchpad_tap_default_disabled, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_ANY); + litest_add("touchpad:tap", touchpad_tap_default_enabled, LITEST_TOUCHPAD, LITEST_BUTTON); litest_add("touchpad:tap", touchpad_tap_invalid, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_tap_is_available, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:tap", touchpad_tap_is_not_available, LITEST_ANY, LITEST_TOUCHPAD); @@ -3295,7 +3397,7 @@ int main(int argc, char **argv) { litest_add("touchpad:click", touchpad_click_defaults_btnarea, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); litest_add("touchpad:click", touchpad_click_defaults_none, LITEST_TOUCHPAD, LITEST_CLICKPAD); - litest_add("touchpad:click", touchpad_btn_left, LITEST_TOUCHPAD, LITEST_CLICKPAD); + litest_add("touchpad:click", touchpad_btn_left, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); litest_add("touchpad:click", clickpad_btn_left, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:click", clickpad_click_n_drag, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH); @@ -3335,12 +3437,12 @@ int main(int argc, char **argv) { litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY); - litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD, LITEST_CLICKPAD); + litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); litest_add("touchpad:left-handed", touchpad_left_handed_clickpad, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); litest_add("touchpad:left-handed", touchpad_left_handed_clickfinger, LITEST_APPLE_CLICKPAD, LITEST_ANY); litest_add("touchpad:left-handed", touchpad_left_handed_tapping, LITEST_TOUCHPAD, LITEST_ANY); litest_add("touchpad:left-handed", touchpad_left_handed_tapping_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); - litest_add("touchpad:left-handed", touchpad_left_handed_delayed, LITEST_TOUCHPAD, LITEST_CLICKPAD); + litest_add("touchpad:left-handed", touchpad_left_handed_delayed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD); litest_add("touchpad:left-handed", touchpad_left_handed_clickpad_delayed, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); /* Hover tests aren't generic, they only work on this device and