diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-08-06 13:09:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2019-08-08 12:54:52 +1000 |
commit | a71d091e594cd359a4fc0d3e868a48c76573a6f4 (patch) | |
tree | 48ff277086308a8c4b3327d3b5d3d59040dba1c3 | |
parent | c5865f3ef0ec8c3e8f447af1d5d9fc18d8599294 (diff) |
tablet: add a comment explaining why we adjust the pressure offset downwards
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev-tablet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 27f3f8eb..5c6a3825 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1271,6 +1271,11 @@ detect_pressure_offset(struct tablet_dispatch *tablet, offset = pressure->value - pressure->minimum; + /* If we have an event that falls below the current offset, adjust + * the offset downwards. A fast contact can start with a + * higher-than-needed pressure offset and then we'd be tied into a + * high pressure offset for the rest of the session. + */ if (tool->has_pressure_offset) { if (offset < tool->pressure_offset) tool->pressure_offset = offset; |