Fix the wrong bitmask used in detecting single-pressure device
BUG=chromium-os:33949
TEST=on a multi-touch device(not semi-mt like Cr48), follow the steps:
1. have two finger touched on the touchpad with different pressures.
2. press alt-shift-i to generate a user feedback, don't send it out.
3. examine the touchpad_activity_log.txt under /var/log and see if two
finger pressures are different in the log.
Change-Id: I52ac2f1f2d00eb9e57e5c4ce726953d46456d413
Reviewed-on: https://gerrit.chromium.org/gerrit/31578
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
diff --git a/src/libevdev.c b/src/libevdev.c
index 19dfb5e..57a3f61 100644
--- a/src/libevdev.c
+++ b/src/libevdev.c
@@ -227,8 +227,8 @@
int EvdevIsSinglePressureDevice(EvdevPtr device) {
EvdevInfoPtr info = &device->info;
- return (!TestBit(ABS_MT_PRESSURE, info->bitmask) &&
- TestBit(ABS_PRESSURE, info->bitmask));
+ return (!TestBit(ABS_MT_PRESSURE, info->abs_bitmask) &&
+ TestBit(ABS_PRESSURE, info->abs_bitmask));
}
int EvdevProbeMTSlot(EvdevPtr device, MTSlotInfoPtr req) {