diff --git a/src/libinput-util.c b/src/libinput-util.c index 93d73827..e774fb78 100644 --- a/src/libinput-util.c +++ b/src/libinput-util.c @@ -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; diff --git a/test/test-misc.c b/test/test-misc.c index c62cd03e..608bba61 100644 --- a/test/test-misc.c +++ b/test/test-misc.c @@ -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 } };