Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368095
b: refs/heads/master
c: a0ef6a3
h: refs/heads/master
i:
  368093: 400e7e3
  368091: 4074d2c
  368087: 8da98e1
  368079: 82a4147
  368063: 6829336
v: v3
  • Loading branch information
Henrik Rydberg authored and Dmitry Torokhov committed Apr 8, 2013
1 parent 0aa35aa commit b27e247
Show file tree
Hide file tree
Showing 3 changed files with 9 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: 7a246777a694563c490811f9d398318652a3ffb4
refs/heads/master: a0ef6a348a47bdb3896c468608f9cd19c1c26949
8 changes: 7 additions & 1 deletion trunk/drivers/input/input-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
}
if (flags & INPUT_MT_DIRECT)
__set_bit(INPUT_PROP_DIRECT, dev->propbit);
if (flags & INPUT_MT_SEMI_MT)
__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
if (flags & INPUT_MT_TRACK) {
unsigned int n2 = num_slots * num_slots;
mt->red = kcalloc(n2, sizeof(*mt->red), GFP_KERNEL);
Expand Down Expand Up @@ -246,6 +248,7 @@ void input_mt_sync_frame(struct input_dev *dev)
{
struct input_mt *mt = dev->mt;
struct input_mt_slot *s;
bool use_count = false;

if (!mt)
return;
Expand All @@ -259,7 +262,10 @@ void input_mt_sync_frame(struct input_dev *dev)
}
}

input_mt_report_pointer_emulation(dev, (mt->flags & INPUT_MT_POINTER));
if ((mt->flags & INPUT_MT_POINTER) && !(mt->flags & INPUT_MT_SEMI_MT))
use_count = true;

input_mt_report_pointer_emulation(dev, use_count);

mt->frame++;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/input/mt.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */
#define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */
#define INPUT_MT_TRACK 0x0008 /* use in-kernel tracking */
#define INPUT_MT_SEMI_MT 0x0010 /* semi-mt device, finger count handled manually */

/**
* struct input_mt_slot - represents the state of an input MT slot
Expand Down

0 comments on commit b27e247

Please sign in to comment.