From: Peter Hutterer Date: Thu, 23 Apr 2015 02:06:42 +0000 (+1000) Subject: touchpad: enable clickfinger by default on chromebooks X-Git-Tag: 0.15.0~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f52dbc5ad9f482e93f65038407c06183c60a5062;p=platform%2Fupstream%2Flibinput.git 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 Tested-by: Benjamin Tissoires Reviewed-by: Hans de Goede --- diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 7f60a53a..608befea 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 af36127a..ee8dfe6e 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 151d1031..2529c198 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 959be0ff..d6a7c91f 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -15,6 +15,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 ##########################################