Input: do not assign new tracking ID when changing tool type
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 15 Aug 2017 23:00:42 +0000 (16:00 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Jun 2018 17:23:39 +0000 (10:23 -0700)
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 <benjamin.tissoires@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input-mt.c

index 8de52e3c00c03817ec86de145f1165f11ae85d92..4a69716e546145b90dc8ec569ededc030d10e710 100644 (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);