[PATCH libinput] Force the HP Stream 11 touchpad as a clickpad

Hans de Goede hdegoede at redhat.com
Thu Sep 1 10:37:55 UTC 2016


Hi,

On 01-09-16 03:38, Peter Hutterer wrote:
> INPUT_PROP_BUTTONPAD is not set on this device and RMI4 which should fix this
> is a bit too far into the future at this point. Hack around it.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=97147
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

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

Regards,

Hans

> ---
>  src/evdev.c                        | 7 +++++++
>  src/evdev.h                        | 1 +
>  udev/90-libinput-model-quirks.hwdb | 4 ++++
>  3 files changed, 12 insertions(+)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 399aab5..3f4a128 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -1950,6 +1950,7 @@ evdev_read_model_flags(struct evdev_device *device)
>  		MODEL(APPLE_INTERNAL_KEYBOARD),
>  		MODEL(CYBORG_RAT),
>  		MODEL(CYAPA),
> +		MODEL(HP_STREAM11_TOUCHPAD),
>  		MODEL(LENOVO_T450_TOUCHPAD),
>  		MODEL(DELL_TOUCHPAD),
>  		MODEL(TRACKBALL),
> @@ -2530,6 +2531,12 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
>  		libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_DOUBLETAP);
>  		libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_TRIPLETAP);
>  	}
> +
> +	/* Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
> +	 * fdo bug 97147. Remove when RMI4 is commonplace */
> +	if (device->model_flags & EVDEV_MODEL_HP_STREAM11_TOUCHPAD)
> +		libevdev_enable_property(device->evdev,
> +					 INPUT_PROP_BUTTONPAD);
>  }
>
>  struct evdev_device *
> diff --git a/src/evdev.h b/src/evdev.h
> index 10b0e58..0d632ef 100644
> --- a/src/evdev.h
> +++ b/src/evdev.h
> @@ -114,6 +114,7 @@ enum evdev_device_model {
>  	EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13),
>  	EVDEV_MODEL_CYBORG_RAT = (1 << 14),
>  	EVDEV_MODEL_CYAPA = (1 << 15),
> +	EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16),
>  	EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
>  	EVDEV_MODEL_DELL_TOUCHPAD = (1 << 18),
>  	EVDEV_MODEL_TRACKBALL = (1 << 19),
> diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
> index 2bccc71..33dd7ff 100644
> --- a/udev/90-libinput-model-quirks.hwdb
> +++ b/udev/90-libinput-model-quirks.hwdb
> @@ -93,6 +93,10 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
>  libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
>   LIBINPUT_MODEL_HP8510_TOUCHPAD=1
>
> +# HP Stream 11
> +evdev:name:SYN1EDE:00 06CB:7442:dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
> + LIBINPUT_MODEL_HP_STREAM11_TOUCHPAD=1
> +
>  ##########################################
>  # LENOVO
>  ##########################################
>


More information about the wayland-devel mailing list