diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-04-23 12:06:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-05-04 19:30:46 +1000 |
commit | f52dbc5ad9f482e93f65038407c06183c60a5062 (patch) | |
tree | 1ee14a13473969a659258df34468aa16f6fcf20a | |
parent | 14025099db42ad96e4a2e973862c48d5a6753a60 (diff) |
touchpad: enable clickfinger by default on chromebooks
This matches the vendor default.
Board IDs pulled from modinfo chromeos_laptop, touchpad names from a bit of
googling around.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/evdev-mt-touchpad-buttons.c | 5 | ||||
-rw-r--r-- | src/evdev.c | 1 | ||||
-rw-r--r-- | src/evdev.h | 1 | ||||
-rw-r--r-- | udev/90-libinput-model-quirks.hwdb | 22 |
4 files changed, 28 insertions, 1 deletions
diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 7f60a53..608befe 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -646,9 +646,12 @@ tp_button_config_click_get_method(struct libinput_device *device) static enum libinput_config_click_method tp_click_get_default_method(struct tp_dispatch *tp) { + struct evdev_device *device = tp->device; + if (!tp->buttons.is_clickpad) return LIBINPUT_CONFIG_CLICK_METHOD_NONE; - else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE) + else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE || + device->model == EVDEV_MODEL_CHROMEBOOK) return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER; else return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; diff --git a/src/evdev.c b/src/evdev.c index af36127..ee8dfe6 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1447,6 +1447,7 @@ evdev_read_model(struct evdev_device *device) enum evdev_device_model model; } model_map[] = { { "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 }, + { "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index 151d103..2529c19 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -96,6 +96,7 @@ enum evdev_middlebutton_event { enum evdev_device_model { EVDEV_MODEL_DEFAULT, EVDEV_MODEL_LENOVO_X230, + EVDEV_MODEL_CHROMEBOOK, }; struct mt_slot { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 959be0f..d6a7c91 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -16,6 +16,28 @@ # Sort by brand, model ########################################## +# Google +########################################## + +# The various chromebooks, info from modinfo chromeos_laptop, touchpad names +# extrapolated from the chromiumos touchad-tests repo +# https://chromium.googlesource.com/chromiumos/platform/touchpad-tests +libinput:name:Cypress APA Trackpad (cyapa):dmi:*pnFalco:pvr* +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Mario*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Butterfly*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Peppy*: +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*ZGB*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Parrot*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Leon*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Falco*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Wolf*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*GOOGLE*:pn*Link*: +libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Alex*: +libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy*: +libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*: + LIBINPUT_MODEL_CHROMEBOOK=1 + +########################################## # LENOVO ########################################## |