[PATCH libinput 1/6] filter: rename motion_filter_destroy to filter_destroy
Peter Hutterer
peter.hutterer at who-t.net
Mon Jul 7 16:21:17 PDT 2014
For better consistency with filter_dispatch(). And move the things around to keep
the consumable API together.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev-mt-touchpad.c | 2 +-
src/evdev.c | 2 +-
src/filter.c | 18 +++++++++---------
src/filter.h | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index fc2a5ab..0b06810 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -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);
}
diff --git a/src/evdev.c b/src/evdev.c
index 183c200..f980812 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -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);
diff --git a/src/filter.c b/src/filter.c
index 3221d19..51cc0e9 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -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)
{
diff --git a/src/filter.h b/src/filter.h
index c0219ee..e670e1b 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -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.
--
1.9.3
More information about the wayland-devel
mailing list