Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343083
b: refs/heads/master
c: 29807d1
h: refs/heads/master
i:
  343081: de8f53e
  343079: 8e6b677
v: v3
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Nov 15, 2012
1 parent d75bf57 commit f12dcf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af8036dd749fbf4e732161ff0f3874759b73be40
refs/heads/master: 29807d1e24b7cd696442d2f600057230f084b3c7
2 changes: 1 addition & 1 deletion trunk/drivers/input/input-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void input_mt_sync_frame(struct input_dev *dev)

if (mt->flags & INPUT_MT_DROP_UNUSED) {
for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
if (s->frame == mt->frame)
if (input_mt_is_used(mt, s))
continue;
input_mt_slot(dev, s - mt->slots);
input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/input/mt.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ static inline bool input_mt_is_active(const struct input_mt_slot *slot)
return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0;
}

static inline bool input_mt_is_used(const struct input_mt *mt,
const struct input_mt_slot *slot)
{
return slot->frame == mt->frame;
}

int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
unsigned int flags);
void input_mt_destroy_slots(struct input_dev *dev);
Expand Down

0 comments on commit f12dcf4

Please sign in to comment.