mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-06 13:00:15 +01:00
util: allow for palm pressure > 255
https://bugs.freedesktop.org/show_bug.cgi?id=105753 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c0fd857def
commit
59eb10e593
2 changed files with 2 additions and 5 deletions
|
|
@ -425,9 +425,7 @@ parse_palm_pressure_property(const char *prop)
|
|||
if (!prop)
|
||||
return 0;
|
||||
|
||||
if (!safe_atoi(prop, &threshold) ||
|
||||
threshold < 0 ||
|
||||
threshold > 255) /* No touchpad device has pressure > 255 */
|
||||
if (!safe_atoi(prop, &threshold) || threshold < 0)
|
||||
return 0;
|
||||
|
||||
return threshold;
|
||||
|
|
|
|||
|
|
@ -1055,16 +1055,15 @@ START_TEST(palm_pressure_parser)
|
|||
{ "1", 1 },
|
||||
{ "10", 10 },
|
||||
{ "255", 255 },
|
||||
{ "360", 360 },
|
||||
|
||||
{ "-12", 0 },
|
||||
{ "360", 0 },
|
||||
{ "0", 0 },
|
||||
{ "-0", 0 },
|
||||
{ "a", 0 },
|
||||
{ "10a", 0 },
|
||||
{ "10-", 0 },
|
||||
{ "sadfasfd", 0 },
|
||||
{ "361", 0 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue