No need to hardcode Apple here, if we have a udev property for this, let's use it.
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- src/evdev-mt-touchpad.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 62ba678e..73600ee5 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -3085,17 +3085,17 @@ tp_init_touch_size(struct tp_dispatch *tp, return false; } + prop = udev_device_get_property_value(device->udev_device, + "LIBINPUT_ATTR_TOUCH_SIZE_RANGE"); + if (!prop) + return false; + if (libevdev_get_num_slots(device->evdev) < 5) { evdev_log_bug_libinput(device, "Expected 5+ slots for touch size detection\n"); return false; } - prop = udev_device_get_property_value(device->udev_device, - "LIBINPUT_ATTR_TOUCH_SIZE_RANGE"); - if (!prop) - return false; - if (!parse_range_property(prop, &hi, &lo)) { evdev_log_bug_client(device, "discarding invalid touch size range '%s'\n", @@ -3138,9 +3138,7 @@ tp_init(struct tp_dispatch *tp, return false; evdev_device_init_abs_range_warnings(device); - - if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD) - use_touch_size = tp_init_touch_size(tp, device); + use_touch_size = tp_init_touch_size(tp, device); if (!use_touch_size) tp_init_pressure(tp, device); -- 2.14.3 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel