[PATCH libinput] evdev: add a quirk for the HP Zbook Studio G3

Hans de Goede hdegoede at redhat.com
Sun Nov 20 10:21:35 UTC 2016


Hi,

On 20-11-16 00:41, Peter Hutterer wrote:
> Announces 4 slots but only sends data for the first two. This causes libinput
> to miss three-finger actions (we don't look at BTN_TOOL_TRIPLETAP if we have
> 3 or more slots).
>
> https://bugs.freedesktop.org/show_bug.cgi?id=98100
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

Patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


> ---
>  src/evdev.c                        | 6 ++++++
>  src/evdev.h                        | 1 +
>  udev/90-libinput-model-quirks.hwdb | 4 ++++
>  3 files changed, 11 insertions(+)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index fac8fcb..6a34e37 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -2179,6 +2179,7 @@ evdev_read_model_flags(struct evdev_device *device)
>  		MODEL(APPLE_MAGICMOUSE),
>  		MODEL(HP8510_TOUCHPAD),
>  		MODEL(HP6910_TOUCHPAD),
> +		MODEL(HP_ZBOOK_STUDIO_G3),
>  #undef MODEL
>  		{ "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL },
>  		{ NULL, EVDEV_MODEL_DEFAULT },
> @@ -2762,6 +2763,11 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
>  	if (device->model_flags & EVDEV_MODEL_HP_STREAM11_TOUCHPAD)
>  		libevdev_enable_property(device->evdev,
>  					 INPUT_PROP_BUTTONPAD);
> +
> +	/* Touchpad claims to have 4 slots but only ever sends 2
> +	 * https://bugs.freedesktop.org/show_bug.cgi?id=98100 */
> +	if (device->model_flags & EVDEV_MODEL_HP_ZBOOK_STUDIO_G3)
> +		libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1);
>  }
>
>  struct evdev_device *
> diff --git a/src/evdev.h b/src/evdev.h
> index b811f51..888cc28 100644
> --- a/src/evdev.h
> +++ b/src/evdev.h
> @@ -121,6 +121,7 @@ enum evdev_device_model {
>  	EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20),
>  	EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21),
>  	EVDEV_MODEL_HP6910_TOUCHPAD = (1 << 22),
> +	EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23),
>  };
>
>  struct mt_slot {
> diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
> index 4bfc0f9..347a229 100644
> --- a/udev/90-libinput-model-quirks.hwdb
> +++ b/udev/90-libinput-model-quirks.hwdb
> @@ -103,6 +103,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510
>  libinput:name:SYN1EDE:00 06CB:7442:dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
>   LIBINPUT_MODEL_HP_STREAM11_TOUCHPAD=1
>
> +# HP Zbook Studio G3
> +libinput:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnHP:pnHPZBookStudioG3:*
> + LIBINPUT_MODEL_HP_ZBOOK_STUDIO_G3=1
> +
>  ##########################################
>  # LENOVO
>  ##########################################
>


More information about the wayland-devel mailing list