diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-03-30 11:36:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-03-30 14:07:26 +1000 |
commit | aa901211252f0e492893a56d3ec368fbe327255b (patch) | |
tree | b3127bf0818d3f3e91510ae1f6fc44284ddb16f9 /src/evdev-mt-touchpad.h | |
parent | b5527fa4c73da687774971ddd7cf6ad2016f89e7 (diff) |
touchpad: reset the motion history on significant negative pressure changes
Resetting the motion history has the side-effect of swallowing movements, we
don't calculate deltas until we have 4 motion events. During a finger release,
we're likely to get a large pressure change between two events, resetting the
motion history prevents the cursor from jumping on release.
The value of 7 found by trial-and-error, tested on the T440 and T450 hardware.
The absolute value is highly variable but recordings show that the pressure
changes only by 1 or 2 units during normal interaction. Higher pressure
changes are during finger position changes but since those should not cause a
jump anyway, we tend to win there too.
Currently only enabled for negative pressure changes, let's see how we go with
that.
https://bugs.freedesktop.org/show_bug.cgi?id=94379
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/evdev-mt-touchpad.h')
-rw-r--r-- | src/evdev-mt-touchpad.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 1f05a03..d1dae83 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -154,6 +154,7 @@ struct tp_touch { uint64_t millis; int distance; /* distance == 0 means touch */ int pressure; + int pressure_delta; struct { /* A quirk mostly used on Synaptics touchpads. In a |