|
@@ -131,8 +131,10 @@ EXPORT_SYMBOL(input_mt_destroy_slots);
|
|
|
* inactive, or if the tool type is changed, a new tracking id is
|
|
|
* assigned to the slot. The tool type is only reported if the
|
|
|
* corresponding absbit field is set.
|
|
|
+ *
|
|
|
+ * Returns true if contact is active.
|
|
|
*/
|
|
|
-void input_mt_report_slot_state(struct input_dev *dev,
|
|
|
+bool input_mt_report_slot_state(struct input_dev *dev,
|
|
|
unsigned int tool_type, bool active)
|
|
|
{
|
|
|
struct input_mt *mt = dev->mt;
|
|
@@ -140,14 +142,14 @@ void input_mt_report_slot_state(struct input_dev *dev,
|
|
|
int id;
|
|
|
|
|
|
if (!mt)
|
|
|
- return;
|
|
|
+ return false;
|
|
|
|
|
|
slot = &mt->slots[mt->slot];
|
|
|
slot->frame = mt->frame;
|
|
|
|
|
|
if (!active) {
|
|
|
input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
id = input_mt_get_value(slot, ABS_MT_TRACKING_ID);
|
|
@@ -156,6 +158,8 @@ void input_mt_report_slot_state(struct input_dev *dev,
|
|
|
|
|
|
input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);
|
|
|
input_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, tool_type);
|
|
|
+
|
|
|
+ return true;
|
|
|
}
|
|
|
EXPORT_SYMBOL(input_mt_report_slot_state);
|
|
|
|