@@ -105,7 +105,8 @@ EXPORT_SYMBOL(input_mt_report_slot_state);
* @dev: input device with allocated MT slots
*
* Performs legacy pointer emulation via BTN_TOUCH, ABS_X, ABS_Y and
- * ABS_PRESSURE. Touchpad finger count is emulated using
+ * ABS_PRESSURE. If enabled, ABS_TRACKING_ID is emitted whenever the
+ * pointer contact changes. Touchpad finger count is emulated using
* BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP and
* BTN_TOOL_QUADTAP.
*
@@ -146,6 +147,7 @@ void input_mt_report_pointer_emulation(struct input_dev *dev)
input_event(dev, EV_ABS, ABS_X, x);
input_event(dev, EV_ABS, ABS_Y, y);
input_event(dev, EV_ABS, ABS_PRESSURE, p);
+ input_event(dev, EV_ABS, ABS_TRACKING_ID, oldid);
} else {
input_event(dev, EV_ABS, ABS_PRESSURE, 0);
}
@@ -716,6 +716,7 @@ struct input_keymap_entry {
#define ABS_TILT_X 0x1a
#define ABS_TILT_Y 0x1b
#define ABS_TOOL_WIDTH 0x1c
+#define ABS_TRACKING_ID 0x1d /* ID of contact governing ABS_{X,Y} */
#define ABS_VOLUME 0x20