tp->palm.right_edge = INT_MAX;
tp->palm.left_edge = INT_MIN;
- /* We don't know how big the touchpad is */
- if (device->abs.absinfo_x->resolution == 1)
- return 0;
-
width = abs(device->abs.absinfo_x->maximum -
device->abs.absinfo_x->minimum);
- /* Enable palm detection on touchpads >= 80 mm. Anything smaller
- probably won't need it, until we find out it does */
- if (width/device->abs.absinfo_x->resolution < 80)
- return 0;
+ /* Apple touchpads are always big enough to warrant palm detection */
+ if (evdev_device_get_id_vendor(device) != VENDOR_ID_APPLE) {
+ /* We don't know how big the touchpad is */
+ if (device->abs.absinfo_x->resolution == 1)
+ return 0;
+
+ /* Enable palm detection on touchpads >= 80 mm. Anything smaller
+ probably won't need it, until we find out it does */
+ if (width/device->abs.absinfo_x->resolution < 80)
+ return 0;
+ }
/* palm edges are 5% of the width on each side */
tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05;
};
static struct input_absinfo absinfo[] = {
- { ABS_X, 1472, 5472, 0, 0, 75 },
- { ABS_Y, 1408, 4448, 0, 0, 129 },
- { ABS_PRESSURE, 0, 255, 0, 0, 0 },
- { ABS_TOOL_WIDTH, 0, 15, 0, 0, 0 },
- { ABS_MT_SLOT, 0, 1, 0, 0, 0 },
- { ABS_MT_POSITION_X, 1472, 5472, 0, 0, 75 },
- { ABS_MT_POSITION_Y, 1408, 4448, 0, 0, 129 },
+ { ABS_X, -4824, 4824, 0, 0, 0 },
+ { ABS_Y, -172, 4290, 0, 0, 0 },
+ { ABS_PRESSURE, 0, 256, 5, 0, 0 },
+ { ABS_TOOL_WIDTH, 0, 16, 0, 0, 0 },
+ { ABS_MT_SLOT, 0, 15, 0, 0, 0 },
+ { ABS_MT_POSITION_X, -4824, 4824, 17, 0, 0 },
+ { ABS_MT_POSITION_Y, -172, 4290, 17, 0, 0 },
+ { ABS_MT_ORIENTATION, -16384, 16384, 3276, 0, 0 },
+ { ABS_MT_TOUCH_MAJOR, 0, 2048, 81, 0, 0 },
+ { ABS_MT_TOUCH_MINOR, 0, 2048, 81, 0, 0 },
+ { ABS_MT_WIDTH_MAJOR, 0, 2048, 81, 0, 0 },
+ { ABS_MT_WIDTH_MINOR, 0, 2048, 81, 0, 0 },
{ ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 },
{ ABS_MT_PRESSURE, 0, 255, 0, 0, 0 },
{ .value = -1 },