mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 00:00:28 +01:00
Merge branch 'master' into tablet-support
This commit is contained in:
commit
6261e4e61f
7 changed files with 37 additions and 4 deletions
|
|
@ -117,4 +117,22 @@ defaults or any other reason. The effects of setting these properties, the
|
|||
format of the property and the value of the property are subject to change
|
||||
at any time.
|
||||
|
||||
@subsection model_specific_configuration_x220fw81 Lenovo x220 with touchpad firmware v8.1
|
||||
|
||||
The property <b>LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81</b> may be set by a
|
||||
user in a local hwdb file. This property designates the touchpad on a Lenovo
|
||||
x220 with a touchpad firmware version 8.1. When this firmware version is
|
||||
installed, the touchpad is imprecise. The touchpad device does not send
|
||||
continuos x/y axis position updates, a behavior also observed on its
|
||||
successor model, the Lenovo x230 which has the same firmware version. If the
|
||||
above property is set, libinput adjusts its behavior to better suit this
|
||||
particular model.
|
||||
|
||||
The touchpad firmware version cannot be detected automatically by libinput,
|
||||
local configuration is required to set this property. Refer to the libinput
|
||||
model quirks hwdb for instructions.
|
||||
|
||||
This property must not be used for any other purpose, no specific behavior
|
||||
is guaranteed.
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1566,7 +1566,8 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal)
|
|||
tp->accel.x_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_x;
|
||||
tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y;
|
||||
|
||||
if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230)
|
||||
if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230 ||
|
||||
tp->device->model_flags & EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81)
|
||||
filter = create_pointer_accelerator_filter_lenovo_x230(tp->device->dpi);
|
||||
else
|
||||
filter = create_pointer_accelerator_filter_touchpad(tp->device->dpi);
|
||||
|
|
|
|||
|
|
@ -1651,6 +1651,7 @@ evdev_read_model_flags(struct evdev_device *device)
|
|||
enum evdev_device_model model;
|
||||
} model_map[] = {
|
||||
{ "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 },
|
||||
{ "LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81", EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 },
|
||||
{ "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK },
|
||||
{ "LIBINPUT_MODEL_SYSTEM76_BONOBO", EVDEV_MODEL_SYSTEM76_BONOBO },
|
||||
{ "LIBINPUT_MODEL_SYSTEM76_GALAGO", EVDEV_MODEL_SYSTEM76_GALAGO },
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ enum evdev_device_model {
|
|||
EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9),
|
||||
EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10),
|
||||
EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11),
|
||||
EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12),
|
||||
};
|
||||
|
||||
struct mt_slot {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
/* The HW DPI rate we normalize to before calculating pointer acceleration */
|
||||
#define DEFAULT_MOUSE_DPI 1000
|
||||
|
||||
#define CASE_RETURN_STRING(a) case a: return #a;
|
||||
#define CASE_RETURN_STRING(a) case a: return #a
|
||||
|
||||
/*
|
||||
* This list data structure is a verbatim copy from wayland-util.h from the
|
||||
|
|
|
|||
|
|
@ -968,7 +968,7 @@ litest_copy_file(const char *dest, const char *src, const char *header)
|
|||
in = open(src, O_RDONLY);
|
||||
litest_assert_int_gt(in, -1);
|
||||
/* lazy, just check for error and empty file copy */
|
||||
litest_assert_int_gt(sendfile(out, in, NULL, 4096), 0);
|
||||
litest_assert_int_gt(sendfile(out, in, NULL, 40960), 0);
|
||||
close(out);
|
||||
close(in);
|
||||
}
|
||||
|
|
@ -1783,7 +1783,7 @@ litest_scale(const struct litest_device *d, unsigned int axis, double val)
|
|||
litest_assert_double_ge(val, 0.0);
|
||||
litest_assert_double_le(val, 100.0);
|
||||
|
||||
if (axis <= ABS_X) {
|
||||
if (axis <= ABS_Y) {
|
||||
min = d->interface->min[axis];
|
||||
max = d->interface->max[axis];
|
||||
return (max - min) * val/100.0 + min;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,18 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*
|
|||
# LENOVO
|
||||
##########################################
|
||||
|
||||
# X220 after a bios update updating the touchpad firmware version to 8.1
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1264453 for details
|
||||
# If the touchpad is unresponsive and dmesg includes this line
|
||||
# psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1 [...]
|
||||
# then copy the two lines below into a new file
|
||||
# /etc/udev/hwdb.d/90-libinput-x220-touchpad-fw81.hwdb, then run
|
||||
# sudo udevadm hwdb --update and reboot.
|
||||
#
|
||||
# Copy the two lines below:
|
||||
#libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX220*
|
||||
# LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81=1
|
||||
|
||||
# X230 (Tablet)
|
||||
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230*
|
||||
LIBINPUT_MODEL_LENOVO_X230=1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue