Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce3c71e3 authored by Harry Cutts's avatar Harry Cutts
Browse files

TouchpadInputMapper: set reports_pressure hardware property

This will tell the Gestures library whether a touchpad reports pressure,
allowing it to disable pressure thresholds for touchpads that don't.

Bug: 292051746
Bug: 281907436
Test: with https://crrev.com/c/4794689 patched in libchrome-gestures,
      try tapping to click on the Lenovo P12 Pro keyboard pack touchpad
Change-Id: I9d7fdb40cf20ee4f8261a6b0e5bf94c58017749e
parent 3e7eb31b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ HardwareProperties createHardwareProperties(const InputDeviceContext& context) {
    // Linux Kernel haptic touchpad support isn't merged yet, so for now assume that no touchpads
    // are haptic.
    props.is_haptic_pad = false;

    RawAbsoluteAxisInfo absMtPressure;
    context.getAbsoluteAxisInfo(ABS_MT_PRESSURE, &absMtPressure);
    props.reports_pressure = absMtPressure.valid;
    return props;
}