Input: do not assign new tracking ID when changing tool type

We allow changing tool type (from MT_TOOL_FINGER to MT_TOOL_PALM) so we
should not be forcing new tracking ID for the slot.

Acked-by: Benjamin Tissoires <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
Dmitry Torokhov
2018-06-11 10:23:39 -07:00
parent bf6247a70f
commit c258e84b18
+1 -1
View File
@@ -153,7 +153,7 @@ bool input_mt_report_slot_state(struct input_dev *dev,
}
id = input_mt_get_value(slot, ABS_MT_TRACKING_ID);
if (id < 0 || input_mt_get_value(slot, ABS_MT_TOOL_TYPE) != tool_type)
if (id < 0)
id = input_mt_new_trkid(mt);
input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);