Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
static int
tp_init_accel(struct tp_dispatch *tp, double diagonal)
{
- struct motion_filter *accel;
int res_x, res_y;
if (tp->has_mt) {
tp->accel.y_scale_coeff = DEFAULT_ACCEL_NUMERATOR / diagonal;
}
- accel = create_pointer_accelator_filter(
- pointer_accel_profile_linear);
- if (accel == NULL)
+ if (evdev_device_init_pointer_acceleration(tp->device) == -1)
return -1;
- tp->device->pointer.filter = accel;
-
return 0;
}
return 0.0;
}
-static int
-configure_pointer_acceleration(struct evdev_device *device)
+int
+evdev_device_init_pointer_acceleration(struct evdev_device *device)
{
device->pointer.filter =
create_pointer_accelator_filter(
has_keyboard = 1;
if ((has_abs || has_rel) && has_button) {
- if (configure_pointer_acceleration(device) == -1)
+ if (evdev_device_init_pointer_acceleration(device) == -1)
return -1;
device->seat_caps |= EVDEV_DEVICE_POINTER;
const char *sysname,
const char *syspath);
+int
+evdev_device_init_pointer_acceleration(struct evdev_device *device);
+
struct evdev_dispatch *
evdev_touchpad_create(struct evdev_device *device);