mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 09:50:16 +01:00
tablet: add a comment explaining why we adjust the pressure offset downwards
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c5865f3ef0
commit
a71d091e59
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue