mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-31 20:30:09 +01:00
Merge branch 'disable-gestures-semi-mt'
This commit is contained in:
commit
2fdf71f82b
11 changed files with 218 additions and 213 deletions
|
|
@ -189,8 +189,10 @@ tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch)
|
|||
/*
|
||||
* Semi-mt touchpads have somewhat inaccurate coordinates when
|
||||
* 2 fingers are down, so use a slightly larger threshold.
|
||||
* Elantech semi-mt touchpads are accurate enough though.
|
||||
*/
|
||||
if (tp->semi_mt)
|
||||
if (tp->semi_mt &&
|
||||
(tp->device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) == 0)
|
||||
move_threshold = TP_MM_TO_DPI_NORMALIZED(4);
|
||||
else
|
||||
move_threshold = TP_MM_TO_DPI_NORMALIZED(2);
|
||||
|
|
@ -295,7 +297,7 @@ tp_gesture_twofinger_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
|
|||
((dir2 & 0x80) && (dir1 & 0x01))) {
|
||||
tp_gesture_set_scroll_buildup(tp);
|
||||
return GESTURE_2FG_STATE_SCROLL;
|
||||
} else {
|
||||
} else if (tp->gesture.enabled) {
|
||||
tp_gesture_get_pinch_info(tp,
|
||||
&tp->gesture.initial_distance,
|
||||
&tp->gesture.angle,
|
||||
|
|
@ -303,6 +305,8 @@ tp_gesture_twofinger_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
|
|||
tp->gesture.prev_scale = 1.0;
|
||||
return GESTURE_2FG_STATE_PINCH;
|
||||
}
|
||||
|
||||
return GESTURE_2FG_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
static enum tp_gesture_2fg_state
|
||||
|
|
@ -563,6 +567,11 @@ tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time)
|
|||
int
|
||||
tp_init_gesture(struct tp_dispatch *tp)
|
||||
{
|
||||
if (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)
|
||||
tp->gesture.enabled = false;
|
||||
else
|
||||
tp->gesture.enabled = true;
|
||||
|
||||
tp->gesture.twofinger_state = GESTURE_2FG_STATE_NONE;
|
||||
|
||||
libinput_timer_init(&tp->gesture.finger_count_switch_timer,
|
||||
|
|
|
|||
|
|
@ -1465,6 +1465,21 @@ tp_init_slots(struct tp_dispatch *tp,
|
|||
|
||||
tp->semi_mt = libevdev_has_property(device->evdev, INPUT_PROP_SEMI_MT);
|
||||
|
||||
/* This device has a terrible resolution when two fingers are down,
|
||||
* causing scroll jumps. The single-touch emulation ABS_X/Y is
|
||||
* accurate but the ABS_MT_POSITION touchpoints report the bounding
|
||||
* box and that causes jumps. So we simply pretend it's a single
|
||||
* touch touchpad with the BTN_TOOL bits.
|
||||
* See https://bugzilla.redhat.com/show_bug.cgi?id=1235175 for an
|
||||
* explanation.
|
||||
*/
|
||||
if (tp->semi_mt &&
|
||||
(device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)) {
|
||||
tp->num_slots = 1;
|
||||
tp->slot = 0;
|
||||
tp->has_mt = false;
|
||||
}
|
||||
|
||||
ARRAY_FOR_EACH(max_touches, m) {
|
||||
if (libevdev_has_event_code(device->evdev,
|
||||
EV_KEY,
|
||||
|
|
@ -1526,11 +1541,7 @@ tp_scroll_get_methods(struct tp_dispatch *tp)
|
|||
{
|
||||
uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE;
|
||||
|
||||
/* some Synaptics semi-mt touchpads have a terrible 2fg resolution,
|
||||
* causing scroll jumps. For all other 2fg touchpads, we enable 2fg
|
||||
* scrolling */
|
||||
if (tp->ntouches >= 2 &&
|
||||
(tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT) == 0)
|
||||
if (tp->ntouches >= 2)
|
||||
methods |= LIBINPUT_CONFIG_SCROLL_2FG;
|
||||
|
||||
return methods;
|
||||
|
|
@ -1918,6 +1929,8 @@ tp_init(struct tp_dispatch *tp,
|
|||
return -1;
|
||||
|
||||
device->seat_caps |= EVDEV_DEVICE_POINTER;
|
||||
if (tp->gesture.enabled)
|
||||
device->seat_caps |= EVDEV_DEVICE_GESTURE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ struct tp_dispatch {
|
|||
} accel;
|
||||
|
||||
struct {
|
||||
bool enabled;
|
||||
bool started;
|
||||
unsigned int finger_count;
|
||||
unsigned int finger_count_pending;
|
||||
|
|
|
|||
|
|
@ -1543,6 +1543,7 @@ evdev_read_model_flags(struct evdev_device *device)
|
|||
{ "LIBINPUT_MODEL_ALPS_TOUCHPAD", EVDEV_MODEL_ALPS_TOUCHPAD },
|
||||
{ "LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD", EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD },
|
||||
{ "LIBINPUT_MODEL_JUMPING_SEMI_MT", EVDEV_MODEL_JUMPING_SEMI_MT },
|
||||
{ "LIBINPUT_MODEL_ELANTECH_TOUCHPAD", EVDEV_MODEL_ELANTECH_TOUCHPAD },
|
||||
{ NULL, EVDEV_MODEL_DEFAULT },
|
||||
};
|
||||
const struct model_map *m = model_map;
|
||||
|
|
@ -1950,7 +1951,6 @@ evdev_configure_device(struct evdev_device *device)
|
|||
|
||||
if (udev_tags & EVDEV_UDEV_TAG_TOUCHPAD) {
|
||||
device->dispatch = evdev_mt_touchpad_create(device);
|
||||
device->seat_caps |= EVDEV_DEVICE_GESTURE;
|
||||
log_info(libinput,
|
||||
"input device '%s', %s is a touchpad\n",
|
||||
device->devname, devnode);
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ enum evdev_device_model {
|
|||
EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8),
|
||||
EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9),
|
||||
EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10),
|
||||
EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11),
|
||||
};
|
||||
|
||||
struct mt_slot {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,12 @@ START_TEST(gestures_cap)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
ck_assert(libinput_device_has_capability(device,
|
||||
LIBINPUT_DEVICE_CAP_GESTURE));
|
||||
if (litest_is_synaptics_semi_mt(dev))
|
||||
ck_assert(!libinput_device_has_capability(device,
|
||||
LIBINPUT_DEVICE_CAP_GESTURE));
|
||||
else
|
||||
ck_assert(libinput_device_has_capability(device,
|
||||
LIBINPUT_DEVICE_CAP_GESTURE));
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
|||
|
|
@ -472,6 +472,99 @@ litest_disable_tap(struct libinput_device *device)
|
|||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
litest_has_2fg_scroll(struct litest_device *dev)
|
||||
{
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
return !!(libinput_device_config_scroll_get_methods(device) &
|
||||
LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_enable_2fg_scroll(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_scroll_set_method(device,
|
||||
LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_enable_edge_scroll(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_scroll_set_method(device,
|
||||
LIBINPUT_CONFIG_SCROLL_EDGE);
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_enable_clickfinger(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_enable_buttonareas(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline int
|
||||
litest_is_synaptics_semi_mt(struct litest_device *dev)
|
||||
{
|
||||
struct libevdev *evdev = dev->evdev;
|
||||
|
||||
return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) &&
|
||||
libevdev_get_id_vendor(evdev) == 0x2 &&
|
||||
libevdev_get_id_product(evdev) == 0x7;
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_enable_drag_lock(struct libinput_device *device)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
status = libinput_device_config_tap_set_drag_lock_enabled(device,
|
||||
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED);
|
||||
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline void
|
||||
litest_disable_drag_lock(struct libinput_device *device)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
status = libinput_device_config_tap_set_drag_lock_enabled(device,
|
||||
LIBINPUT_CONFIG_DRAG_LOCK_DISABLED);
|
||||
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
#define CK_DOUBLE_EQ_EPSILON 1E-3
|
||||
#define ck_assert_double_eq(X,Y) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -32,30 +32,6 @@
|
|||
#include "libinput-util.h"
|
||||
#include "litest.h"
|
||||
|
||||
static void
|
||||
enable_clickfinger(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_buttonareas(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
START_TEST(touchpad_click_defaults_clickfinger)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
|
|
@ -141,7 +117,7 @@ START_TEST(touchpad_1fg_clickfinger)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -166,7 +142,7 @@ START_TEST(touchpad_1fg_clickfinger_no_touch)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -189,7 +165,7 @@ START_TEST(touchpad_2fg_clickfinger)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -219,7 +195,7 @@ START_TEST(touchpad_3fg_clickfinger)
|
|||
if (libevdev_get_num_slots(dev->evdev) < 3)
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -254,7 +230,7 @@ START_TEST(touchpad_3fg_clickfinger_btntool)
|
|||
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -293,7 +269,7 @@ START_TEST(touchpad_4fg_clickfinger)
|
|||
if (libevdev_get_num_slots(dev->evdev) < 4)
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -338,7 +314,7 @@ START_TEST(touchpad_4fg_clickfinger_btntool_2slots)
|
|||
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_QUADTAP))
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -384,7 +360,7 @@ START_TEST(touchpad_4fg_clickfinger_btntool_3slots)
|
|||
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -435,7 +411,7 @@ START_TEST(touchpad_2fg_clickfinger_distance)
|
|||
h < 50.0)
|
||||
small_touchpad = true;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -490,7 +466,7 @@ START_TEST(touchpad_3fg_clickfinger_distance)
|
|||
if (libevdev_get_num_slots(dev->evdev) < 3)
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -524,7 +500,7 @@ START_TEST(touchpad_3fg_clickfinger_distance_btntool)
|
|||
if (libevdev_get_num_slots(dev->evdev) > 2)
|
||||
return;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -628,7 +604,7 @@ START_TEST(touchpad_clickfinger_to_area_method)
|
|||
|
||||
litest_drain_events(li);
|
||||
|
||||
enable_buttonareas(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 95, 95);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
|
|
@ -643,7 +619,7 @@ START_TEST(touchpad_clickfinger_to_area_method)
|
|||
litest_assert_button_event(li, BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -671,7 +647,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down)
|
|||
|
||||
litest_drain_events(li);
|
||||
|
||||
enable_buttonareas(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 95, 95);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
|
|
@ -680,7 +656,7 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down)
|
|||
litest_assert_button_event(li, BTN_RIGHT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
@ -714,7 +690,7 @@ START_TEST(touchpad_area_to_clickfinger_method)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -732,7 +708,7 @@ START_TEST(touchpad_area_to_clickfinger_method)
|
|||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_RELEASED);
|
||||
|
||||
enable_buttonareas(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 95, 95);
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 1);
|
||||
|
|
@ -755,7 +731,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -766,7 +742,7 @@ START_TEST(touchpad_area_to_clickfinger_method_while_down)
|
|||
litest_assert_button_event(li, BTN_LEFT,
|
||||
LIBINPUT_BUTTON_STATE_PRESSED);
|
||||
|
||||
enable_buttonareas(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_LEFT, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
|
@ -797,7 +773,7 @@ START_TEST(touchpad_clickfinger_3fg_tool_position)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* one in thumb area, one in normal area + TRIPLETAP. spread is wide
|
||||
|
|
@ -827,7 +803,7 @@ START_TEST(touchpad_clickfinger_4fg_tool_position)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 5, 99);
|
||||
|
|
@ -878,7 +854,7 @@ START_TEST(clickpad_btn_left)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_buttonareas(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -1487,7 +1463,7 @@ START_TEST(clickpad_topsoftbuttons_clickfinger)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -1534,7 +1510,7 @@ START_TEST(clickpad_topsoftbuttons_clickfinger_dev_disabled)
|
|||
|
||||
libinput_device_config_send_events_set_mode(dev->libinput_device,
|
||||
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 90, 5);
|
||||
|
|
|
|||
|
|
@ -32,30 +32,6 @@
|
|||
#include "libinput-util.h"
|
||||
#include "litest.h"
|
||||
|
||||
static inline void
|
||||
enable_drag_lock(struct libinput_device *device)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
status = libinput_device_config_tap_set_drag_lock_enabled(device,
|
||||
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED);
|
||||
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline void
|
||||
disable_drag_lock(struct libinput_device *device)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
status = libinput_device_config_tap_set_drag_lock_enabled(device,
|
||||
LIBINPUT_CONFIG_DRAG_LOCK_DISABLED);
|
||||
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
START_TEST(touchpad_1fg_tap)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
|
|
@ -265,6 +241,9 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg)
|
|||
int range = _i,
|
||||
ntaps;
|
||||
|
||||
if (litest_is_synaptics_semi_mt(dev))
|
||||
return;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
|
@ -467,7 +446,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap)
|
|||
ntaps;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -540,7 +519,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click)
|
|||
ntaps;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -621,7 +600,7 @@ START_TEST(touchpad_1fg_tap_n_drag)
|
|||
struct libinput_event_pointer *ptrev __attribute__((unused));
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
disable_drag_lock(dev->libinput_device);
|
||||
litest_disable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -663,7 +642,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -704,7 +683,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -746,7 +725,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap_click)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -791,7 +770,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_timeout)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_drag_lock(dev->libinput_device);
|
||||
litest_enable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -822,7 +801,7 @@ START_TEST(touchpad_2fg_tap_n_drag)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
disable_drag_lock(dev->libinput_device);
|
||||
litest_disable_drag_lock(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
|
|||
174
test/touchpad.c
174
test/touchpad.c
|
|
@ -32,75 +32,6 @@
|
|||
#include "libinput-util.h"
|
||||
#include "litest.h"
|
||||
|
||||
static bool
|
||||
has_2fg_scroll(struct litest_device *dev)
|
||||
{
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
return !!(libinput_device_config_scroll_get_methods(device) &
|
||||
LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_2fg_scroll(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_scroll_set_method(device,
|
||||
LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_edge_scroll(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_scroll_set_method(device,
|
||||
LIBINPUT_CONFIG_SCROLL_EDGE);
|
||||
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_clickfinger(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_buttonareas(struct litest_device *dev)
|
||||
{
|
||||
enum libinput_config_status status, expected;
|
||||
struct libinput_device *device = dev->libinput_device;
|
||||
|
||||
status = libinput_device_config_click_set_method(device,
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS);
|
||||
expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
litest_assert_int_eq(status, expected);
|
||||
}
|
||||
|
||||
static inline int
|
||||
is_synaptics_semi_mt(struct litest_device *dev)
|
||||
{
|
||||
struct libevdev *evdev = dev->evdev;
|
||||
|
||||
return libevdev_has_property(evdev, INPUT_PROP_SEMI_MT) &&
|
||||
libevdev_get_id_vendor(evdev) == 0x2 &&
|
||||
libevdev_get_id_product(evdev) == 0x7;
|
||||
}
|
||||
|
||||
START_TEST(touchpad_1fg_motion)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
|
|
@ -192,10 +123,10 @@ START_TEST(touchpad_2fg_scroll)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
test_2fg_scroll(dev, 0.1, 40, 0);
|
||||
|
|
@ -222,7 +153,7 @@ START_TEST(touchpad_2fg_scroll_slow_distance)
|
|||
const struct input_absinfo *y;
|
||||
double y_move;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
/* We want to move > 5 mm. */
|
||||
|
|
@ -234,7 +165,7 @@ START_TEST(touchpad_2fg_scroll_slow_distance)
|
|||
y_move = 20.0;
|
||||
}
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 49, 50);
|
||||
|
|
@ -279,10 +210,10 @@ START_TEST(touchpad_2fg_scroll_source)
|
|||
struct libinput_event *event;
|
||||
struct libinput_event_pointer *ptrev;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
test_2fg_scroll(dev, 0, 30, 0);
|
||||
|
|
@ -304,10 +235,10 @@ START_TEST(touchpad_2fg_scroll_semi_mt)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 20, 20);
|
||||
|
|
@ -328,10 +259,10 @@ START_TEST(touchpad_2fg_scroll_return_to_motion)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* start with motion */
|
||||
|
|
@ -399,10 +330,10 @@ START_TEST(touchpad_scroll_natural_2fg)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!has_2fg_scroll(dev))
|
||||
if (!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1);
|
||||
|
|
@ -425,7 +356,7 @@ START_TEST(touchpad_edge_scroll)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 99, 20);
|
||||
litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0);
|
||||
|
|
@ -471,14 +402,12 @@ START_TEST(touchpad_scroll_defaults)
|
|||
|
||||
method = libinput_device_config_scroll_get_methods(device);
|
||||
ck_assert(method & LIBINPUT_CONFIG_SCROLL_EDGE);
|
||||
if (libevdev_get_num_slots(evdev) > 1 &&
|
||||
!is_synaptics_semi_mt(dev))
|
||||
if (libevdev_get_num_slots(evdev) > 1)
|
||||
ck_assert(method & LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
else
|
||||
ck_assert((method & LIBINPUT_CONFIG_SCROLL_2FG) == 0);
|
||||
|
||||
if (libevdev_get_num_slots(evdev) > 1 &&
|
||||
!is_synaptics_semi_mt(dev))
|
||||
if (libevdev_get_num_slots(evdev) > 1)
|
||||
expected = LIBINPUT_CONFIG_SCROLL_2FG;
|
||||
else
|
||||
expected = LIBINPUT_CONFIG_SCROLL_EDGE;
|
||||
|
|
@ -494,8 +423,7 @@ START_TEST(touchpad_scroll_defaults)
|
|||
status = libinput_device_config_scroll_set_method(device,
|
||||
LIBINPUT_CONFIG_SCROLL_2FG);
|
||||
|
||||
if (libevdev_get_num_slots(evdev) > 1 &&
|
||||
!is_synaptics_semi_mt(dev))
|
||||
if (libevdev_get_num_slots(evdev) > 1)
|
||||
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
|
||||
else
|
||||
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED);
|
||||
|
|
@ -522,7 +450,7 @@ START_TEST(touchpad_edge_scroll_timeout)
|
|||
}
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 99, 20);
|
||||
libinput_dispatch(li);
|
||||
|
|
@ -568,7 +496,7 @@ START_TEST(touchpad_edge_scroll_no_motion)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 99, 10);
|
||||
litest_touch_move_to(dev, 0, 99, 10, 99, 70, 10, 0);
|
||||
|
|
@ -590,7 +518,7 @@ START_TEST(touchpad_edge_scroll_no_edge_after_motion)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
/* moving into the edge zone must not trigger scroll events */
|
||||
litest_touch_down(dev, 0, 20, 20);
|
||||
|
|
@ -612,7 +540,7 @@ START_TEST(touchpad_edge_scroll_source)
|
|||
struct libinput_event_pointer *ptrev;
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 99, 20);
|
||||
litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0);
|
||||
|
|
@ -637,7 +565,7 @@ START_TEST(touchpad_edge_scroll_no_2fg)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
litest_drain_events(li);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_touch_down(dev, 0, 49, 50);
|
||||
litest_touch_down(dev, 1, 51, 50);
|
||||
|
|
@ -656,8 +584,8 @@ START_TEST(touchpad_edge_scroll_into_buttonareas)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_buttonareas(dev);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 99, 40);
|
||||
|
|
@ -682,8 +610,8 @@ START_TEST(touchpad_edge_scroll_within_buttonareas)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_buttonareas(dev);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 20, 99);
|
||||
|
|
@ -710,8 +638,8 @@ START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll)
|
|||
struct libinput_event_pointer *ptrev;
|
||||
double val;
|
||||
|
||||
enable_buttonareas(dev);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_buttonareas(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 20, 95);
|
||||
|
|
@ -757,8 +685,8 @@ START_TEST(touchpad_edge_scroll_clickfinger_click_stops_scroll)
|
|||
struct libinput_event_pointer *ptrev;
|
||||
double val;
|
||||
|
||||
enable_clickfinger(dev);
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_touch_down(dev, 0, 20, 95);
|
||||
|
|
@ -802,7 +730,7 @@ START_TEST(touchpad_edge_scroll_into_area)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* move into area, move vertically, move back to edge */
|
||||
|
|
@ -846,10 +774,10 @@ START_TEST(touchpad_palm_detect_at_edge)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!touchpad_has_palm_detect_size(dev) ||
|
||||
!has_2fg_scroll(dev))
|
||||
!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
|
|
@ -875,7 +803,7 @@ START_TEST(touchpad_no_palm_detect_at_edge_for_edge_scrolling)
|
|||
if (!touchpad_has_palm_detect_size(dev))
|
||||
return;
|
||||
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
||||
|
|
@ -893,10 +821,10 @@ START_TEST(touchpad_palm_detect_at_bottom_corners)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!touchpad_has_palm_detect_size(dev) ||
|
||||
!has_2fg_scroll(dev))
|
||||
!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
|
|
@ -922,10 +850,10 @@ START_TEST(touchpad_palm_detect_at_top_corners)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!touchpad_has_palm_detect_size(dev) ||
|
||||
!has_2fg_scroll(dev))
|
||||
!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
|
|
@ -951,10 +879,10 @@ START_TEST(touchpad_palm_detect_palm_stays_palm)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!touchpad_has_palm_detect_size(dev) ||
|
||||
!has_2fg_scroll(dev))
|
||||
!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
|
|
@ -973,10 +901,10 @@ START_TEST(touchpad_palm_detect_palm_becomes_pointer)
|
|||
struct libinput *li = dev->libinput;
|
||||
|
||||
if (!touchpad_has_palm_detect_size(dev) ||
|
||||
!has_2fg_scroll(dev))
|
||||
!litest_has_2fg_scroll(dev))
|
||||
return;
|
||||
|
||||
enable_2fg_scroll(dev);
|
||||
litest_enable_2fg_scroll(dev);
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
|
|
@ -2573,7 +2501,7 @@ START_TEST(touchpad_dwt_edge_scroll)
|
|||
if (!has_disable_while_typing(touchpad))
|
||||
return;
|
||||
|
||||
enable_edge_scroll(touchpad);
|
||||
litest_enable_edge_scroll(touchpad);
|
||||
|
||||
keyboard = litest_add_device(li, LITEST_KEYBOARD);
|
||||
litest_drain_events(li);
|
||||
|
|
@ -2620,7 +2548,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt)
|
|||
if (!has_disable_while_typing(touchpad))
|
||||
return;
|
||||
|
||||
enable_edge_scroll(touchpad);
|
||||
litest_enable_edge_scroll(touchpad);
|
||||
|
||||
keyboard = litest_add_device(li, LITEST_KEYBOARD);
|
||||
litest_drain_events(li);
|
||||
|
|
@ -2979,7 +2907,7 @@ START_TEST(touchpad_thumb_update_no_motion)
|
|||
};
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
if (!has_thumb_detect(dev))
|
||||
return;
|
||||
|
|
@ -3005,7 +2933,7 @@ START_TEST(touchpad_thumb_moving)
|
|||
};
|
||||
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
if (!has_thumb_detect(dev))
|
||||
return;
|
||||
|
|
@ -3129,7 +3057,7 @@ START_TEST(touchpad_thumb_edgescroll)
|
|||
if (!has_thumb_detect(dev))
|
||||
return;
|
||||
|
||||
enable_edge_scroll(dev);
|
||||
litest_enable_edge_scroll(dev);
|
||||
litest_disable_tap(dev->libinput_device);
|
||||
|
||||
litest_drain_events(li);
|
||||
|
|
@ -3161,7 +3089,7 @@ START_TEST(touchpad_thumb_tap_begin)
|
|||
return;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* touch down is a thumb */
|
||||
|
|
@ -3194,7 +3122,7 @@ START_TEST(touchpad_thumb_tap_touch)
|
|||
return;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* event after touch down is thumb */
|
||||
|
|
@ -3227,7 +3155,7 @@ START_TEST(touchpad_thumb_tap_hold)
|
|||
return;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* event in state HOLD is thumb */
|
||||
|
|
@ -3261,7 +3189,7 @@ START_TEST(touchpad_thumb_tap_hold_2ndfg)
|
|||
return;
|
||||
|
||||
litest_enable_tap(dev->libinput_device);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
litest_drain_events(li);
|
||||
|
||||
/* event in state HOLD is thumb */
|
||||
|
|
@ -3370,7 +3298,7 @@ START_TEST(touchpad_tool_tripletap_touch_count)
|
|||
* https://bugs.freedesktop.org/show_bug.cgi?id=91352
|
||||
*/
|
||||
litest_drain_events(li);
|
||||
enable_clickfinger(dev);
|
||||
litest_enable_clickfinger(dev);
|
||||
|
||||
/* touch 1 down */
|
||||
litest_event(dev, EV_ABS, ABS_MT_SLOT, 0);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ libinput:touchpad:input:b0005v05ACp*
|
|||
##########################################
|
||||
libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*
|
||||
LIBINPUT_ATTR_RESOLUTION_HINT=31x31
|
||||
LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1
|
||||
|
||||
##########################################
|
||||
# Google
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue