summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2022-09-02 14:18:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2022-09-08 09:03:15 +1000
commit9179acd6384c3d0ec7e4c15d38e1d054a370a0ee (patch)
tree8774579638860e7b54da74837fbc9991bf714617
parent70c57e964450f4563858ec900703a38bde7eef7b (diff)
downloadlibinput-9179acd6384c3d0ec7e4c15d38e1d054a370a0ee.tar.gz
filter: a few whitespace fixes and extra comments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/filter-mouse.c5
-rw-r--r--src/filter-touchpad-flat.c10
-rw-r--r--src/filter.c7
3 files changed, 12 insertions, 10 deletions
diff --git a/src/filter-mouse.c b/src/filter-mouse.c
index 0c2f1fef..470175f2 100644
--- a/src/filter-mouse.c
+++ b/src/filter-mouse.c
@@ -81,11 +81,12 @@ calculate_acceleration_factor(struct pointer_accelerator *accel,
trackers_feed(&accel->trackers, unaccelerated, time);
velocity = trackers_velocity(&accel->trackers, time);
+ /* This will call into our pointer_accel_profile_linear() profile func */
accel_factor = calculate_acceleration_simpsons(&accel->base,
accel->profile,
data,
- velocity,
- accel->last_velocity,
+ velocity, /* normalized coords */
+ accel->last_velocity, /* normalized coords */
time);
accel->last_velocity = velocity;
diff --git a/src/filter-touchpad-flat.c b/src/filter-touchpad-flat.c
index e69e7afa..bb6c31ad 100644
--- a/src/filter-touchpad-flat.c
+++ b/src/filter-touchpad-flat.c
@@ -46,8 +46,8 @@ struct touchpad_accelerator_flat {
static struct normalized_coords
accelerator_filter_touchpad_flat(struct motion_filter *filter,
- const struct device_float_coords *unaccelerated,
- void *data, uint64_t time)
+ const struct device_float_coords *unaccelerated,
+ void *data, uint64_t time)
{
struct touchpad_accelerator_flat *accel =
(struct touchpad_accelerator_flat *)filter;
@@ -66,8 +66,8 @@ accelerator_filter_touchpad_flat(struct motion_filter *filter,
static struct normalized_coords
accelerator_filter_noop_touchpad_flat(struct motion_filter *filter,
- const struct device_float_coords *unaccelerated,
- void *data, uint64_t time)
+ const struct device_float_coords *unaccelerated,
+ void *data, uint64_t time)
{
struct touchpad_accelerator_flat *accel =
(struct touchpad_accelerator_flat *) filter;
@@ -82,7 +82,7 @@ accelerator_filter_noop_touchpad_flat(struct motion_filter *filter,
static bool
accelerator_set_speed_touchpad_flat(struct motion_filter *filter,
- double speed_adjustment)
+ double speed_adjustment)
{
struct touchpad_accelerator_flat *accel_filter =
(struct touchpad_accelerator_flat *)filter;
diff --git a/src/filter.c b/src/filter.c
index 0e309519..28df8140 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -189,8 +189,8 @@ trackers_velocity_after_timeout(struct pointer_tracker *tracker,
* movement in normal use-cases (pause, move, pause, move)
*/
return calculate_trackers_velocity(tracker,
- tracker->time + MOTION_TIMEOUT,
- smoothener);
+ tracker->time + MOTION_TIMEOUT,
+ smoothener);
}
/**
@@ -269,7 +269,8 @@ trackers_velocity(struct pointer_trackers *trackers, uint64_t time)
*
* @param accel The acceleration filter
* @param data Caller-specific data
- * @param velocity Velocity in device-units per µs
+ * @param velocity Velocity - depending on the caller this may be in
+ * device-units per µs or normalized per µs
* @param last_velocity Previous velocity in device-units per µs
* @param time Current time in µs
*