mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-23 21:20:43 +01:00
touchpad: elantech touchpads can use a 2mm gesture motion threshold
Unlike ALPS and Synaptics semi-mt touchpads, the Elantech touchpads appear to be precise enough to allow a smaller motion threshold before we decide on the type of gesture (pinch vs scroll). https://bugs.freedesktop.org/show_bug.cgi?id=91475 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
96d0e06f13
commit
6933062dab
4 changed files with 6 additions and 1 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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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