touchpad: hook up pointer acceleration configuration

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2014-07-04 09:44:43 +10:00
parent cd6b5770b2
commit 1dfb248ab9
3 changed files with 7 additions and 9 deletions

View file

@ -806,7 +806,6 @@ tp_init_slots(struct tp_dispatch *tp,
static int
tp_init_accel(struct tp_dispatch *tp, double diagonal)
{
struct motion_filter *accel;
int res_x, res_y;
if (tp->has_mt) {
@ -843,13 +842,9 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal)
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;
}

View file

@ -893,8 +893,8 @@ evdev_accel_config_get_default_speed(struct libinput_device *device)
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(
@ -1090,7 +1090,7 @@ evdev_configure_device(struct evdev_device *device)
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;

View file

@ -177,6 +177,9 @@ evdev_device_create(struct libinput_seat *seat,
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);