diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 4344da54..f69933dd 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1057,11 +1057,11 @@ tablet_get_tool(struct tablet_dispatch *tablet, if (pressure) { tool->pressure_offset = pressure->minimum; - /* 5% of the pressure range */ + /* 5 and 1% of the pressure range */ tool->pressure_threshold.upper = axis_range_percentage(pressure, 5); tool->pressure_threshold.lower = - pressure->minimum; + axis_range_percentage(pressure, 1); } tool_set_bits(tablet, tool); @@ -1246,6 +1246,7 @@ detect_pressure_offset(struct tablet_dispatch *tablet, LIBINPUT_VERSION); tool->pressure_offset = offset; tool->has_pressure_offset = true; + tool->pressure_threshold.lower = pressure->minimum; } static void diff --git a/test/test-tablet.c b/test/test-tablet.c index bc089389..421e82c3 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -3458,7 +3458,7 @@ START_TEST(tablet_pressure_range) litest_drain_events(li); libinput_dispatch(li); - for (pressure = 1; pressure <= 100; pressure += 10) { + for (pressure = 10; pressure <= 100; pressure += 10) { litest_axis_set_value(axes, ABS_PRESSURE, pressure); litest_tablet_motion(dev, 70, 70, axes); libinput_dispatch(li);