mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 10:30:07 +01:00
filter: split a condition up so we can mark it as bug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
eacdf296a5
commit
5016dcd012
1 changed files with 5 additions and 2 deletions
|
|
@ -245,9 +245,12 @@ calculate_velocity(struct pointer_accelerator *accel, uint64_t time)
|
|||
for (offset = 1; offset < NUM_POINTER_TRACKERS; offset++) {
|
||||
tracker = tracker_by_offset(accel, offset);
|
||||
|
||||
/* Bug: time running backwards */
|
||||
if (tracker->time > time)
|
||||
break;
|
||||
|
||||
/* Stop if too far away in time */
|
||||
if (time - tracker->time > MOTION_TIMEOUT ||
|
||||
tracker->time > time) {
|
||||
if (time - tracker->time > MOTION_TIMEOUT) {
|
||||
if (offset == 1)
|
||||
result = calculate_velocity_after_timeout(tracker);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue