[PATCH libinput] touchpad: enable clickfinger by default on some System76 laptops
Hans de Goede
hdegoede at redhat.com
Mon May 4 06:57:56 PDT 2015
Hi,
On 05/04/2015 11:36 AM, Peter Hutterer wrote:
> Bonobo, Clevo, Galago and Kudu have clickpads and no markings ->
> enable clickfinger by default.
>
> Lemur and Gazelle have physical buttons, no need for extra configuration.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=90170
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Hmm, do these come configured like this by system76 ootb ? I'm not
sure if we should start doing per model rather then per vendor defaults
TBH.
If you really think this is a good idea then this is:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> src/evdev-mt-touchpad-buttons.c | 18 ++++++++++++++----
> src/evdev.c | 4 ++++
> src/evdev.h | 4 ++++
> udev/90-libinput-model-quirks.hwdb | 20 ++++++++++++++++++++
> 4 files changed, 42 insertions(+), 4 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c
> index 608befe..d6acbf0 100644
> --- a/src/evdev-mt-touchpad-buttons.c
> +++ b/src/evdev-mt-touchpad-buttons.c
> @@ -650,11 +650,21 @@ tp_click_get_default_method(struct tp_dispatch *tp)
>
> if (!tp->buttons.is_clickpad)
> return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
> - else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE ||
> - device->model == EVDEV_MODEL_CHROMEBOOK)
> + else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE)
> return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
> - else
> - return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
> +
> + switch (device->model) {
> + case EVDEV_MODEL_CHROMEBOOK:
> + case EVDEV_MODEL_SYSTEM76_BONOBO:
> + case EVDEV_MODEL_SYSTEM76_CLEVO:
> + case EVDEV_MODEL_SYSTEM76_GALAGO:
> + case EVDEV_MODEL_SYSTEM76_KUDU:
> + return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
> + default:
> + break;
> + }
> +
> + return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
> }
>
> static enum libinput_config_click_method
> diff --git a/src/evdev.c b/src/evdev.c
> index 89469a5..054360d 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -1448,6 +1448,10 @@ evdev_read_model(struct evdev_device *device)
> } model_map[] = {
> { "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 },
> { "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK },
> + { "LIBINPUT_MODEL_SYSTEM76_BONOBO", EVDEV_MODEL_SYSTEM76_BONOBO },
> + { "LIBINPUT_MODEL_SYSTEM76_CLEVO", EVDEV_MODEL_SYSTEM76_CLEVO },
> + { "LIBINPUT_MODEL_SYSTEM76_GALAGO", EVDEV_MODEL_SYSTEM76_GALAGO },
> + { "LIBINPUT_MODEL_SYSTEM76_KUDU", EVDEV_MODEL_SYSTEM76_KUDU },
> { NULL, EVDEV_MODEL_DEFAULT },
> };
> const struct model_map *m = model_map;
> diff --git a/src/evdev.h b/src/evdev.h
> index 2529c19..20c0b55 100644
> --- a/src/evdev.h
> +++ b/src/evdev.h
> @@ -97,6 +97,10 @@ enum evdev_device_model {
> EVDEV_MODEL_DEFAULT,
> EVDEV_MODEL_LENOVO_X230,
> EVDEV_MODEL_CHROMEBOOK,
> + EVDEV_MODEL_SYSTEM76_BONOBO,
> + EVDEV_MODEL_SYSTEM76_CLEVO,
> + EVDEV_MODEL_SYSTEM76_GALAGO,
> + EVDEV_MODEL_SYSTEM76_KUDU,
> };
>
> struct mt_slot {
> diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
> index d6a7c91..0cdf2b2 100644
> --- a/udev/90-libinput-model-quirks.hwdb
> +++ b/udev/90-libinput-model-quirks.hwdb
> @@ -44,3 +44,23 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*:
> # X230 (Tablet)
> libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230*
> LIBINPUT_MODEL_LENOVO_X230=1
> +
> +##########################################
> +# System76
> +##########################################
> +
> +# Bonobo Professional
> +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrbonp5*
> + LIBINPUT_MODEL_SYSTEM76_BONOBO=1
> +
> +# Clevo
> +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pnW740SU*rnW740SU*
> + LIBINPUT_MODEL_SYSTEM76_CLEVO=1
> +
> +# Galago Ultra Pro
> +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrgalu1*
> + LIBINPUT_MODEL_SYSTEM76_GALAGO=1
> +
> +# Kudu Professional
> +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrkudp1*
> + LIBINPUT_MODEL_SYSTEM76_KUDU=1
>
More information about the wayland-devel
mailing list