For better consistency with filter_dispatch(). And move the things around to keep
the consumable API together.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
tp_destroy_tap(tp);
tp_destroy_buttons(tp);
- motion_filter_destroy(tp->filter);
+ filter_destroy(tp->filter);
free(tp->touches);
free(tp);
}
if (dispatch)
dispatch->interface->destroy(dispatch);
- motion_filter_destroy(device->pointer.filter);
+ filter_destroy(device->pointer.filter);
libinput_seat_unref(device->base.seat);
libevdev_free(device->evdev);
free(device->mt.slots);
filter->interface->filter(filter, motion, data, time);
}
+void
+filter_destroy(struct motion_filter *filter)
+{
+ if (!filter)
+ return;
+
+ filter->interface->destroy(filter);
+}
+
/*
* Default parameters for pointer acceleration profiles.
*/
return &filter->base;
}
-void
-motion_filter_destroy(struct motion_filter *filter)
-{
- if (!filter)
- return;
-
- filter->interface->destroy(filter);
-}
-
static inline double
calc_penumbral_gradient(double x)
{
filter_dispatch(struct motion_filter *filter,
struct motion_params *motion,
void *data, uint64_t time);
+void
+filter_destroy(struct motion_filter *filter);
struct motion_filter_interface {
struct motion_filter *
create_pointer_accelator_filter(accel_profile_func_t filter);
-void
-motion_filter_destroy(struct motion_filter *filter);
/*
* Pointer acceleration profiles.