filter: rename motion_filter_destroy to filter_destroy
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 3 Jul 2014 23:39:05 +0000 (09:39 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 9 Jul 2014 02:39:41 +0000 (12:39 +1000)
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>
src/evdev-mt-touchpad.c
src/evdev.c
src/filter.c
src/filter.h

index fc2a5ab318edf953c1da530f76f4d62ef76385bb..0b06810cf1a739f67b28bcfe1229b2607b0653a1 100644 (file)
@@ -577,7 +577,7 @@ tp_destroy(struct evdev_dispatch *dispatch)
        tp_destroy_tap(tp);
        tp_destroy_buttons(tp);
 
-       motion_filter_destroy(tp->filter);
+       filter_destroy(tp->filter);
        free(tp->touches);
        free(tp);
 }
index 183c200004f4bb8d4b6fb0d07741f58c02c08ad8..f980812bd35d7b468e1d74caac704c00d3be6eca 100644 (file)
@@ -943,7 +943,7 @@ evdev_device_destroy(struct evdev_device *device)
        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);
index 3221d1939554dfa9ac7819fb424be7539583fa31..51cc0e927057573d36ee5a043d3f239a6b9f0106 100644 (file)
@@ -38,6 +38,15 @@ filter_dispatch(struct motion_filter *filter,
        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.
  */
@@ -332,15 +341,6 @@ create_pointer_accelator_filter(accel_profile_func_t profile)
        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)
 {
index c0219eeb33828f95e28ed597d82d5b5157d4dbbc..e670e1b2e6ade249008d7b7170ab461ca69b4e91 100644 (file)
@@ -35,6 +35,8 @@ void
 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 {
@@ -59,8 +61,6 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter,
 struct motion_filter *
 create_pointer_accelator_filter(accel_profile_func_t filter);
 
-void
-motion_filter_destroy(struct motion_filter *filter);
 
 /*
  * Pointer acceleration profiles.