diff options
author | Ping Cheng <pingc@wacom.com> | 2009-12-14 21:29:53 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-12-16 09:35:08 +1000 |
commit | c1c5e4c91b2474fc3bce7029181af61e369bd7d3 (patch) | |
tree | 17d57bb3dd7e71aa21aaa2c1d9641062ba32a9c5 | |
parent | 44ee577ee561c4c27cf05c9c32e57b947972c982 (diff) | |
download | xf86-input-wacom-c1c5e4c91b2474fc3bce7029181af61e369bd7d3.tar.gz |
Report time stamp for 2FGT gesture
2FGT gesture needs to know the time that an event was received
to decide what gesture mode users may want.
Signed-off-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/wcmISDV4.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c index 4c24f5f..6c70dc3 100644 --- a/src/wcmISDV4.c +++ b/src/wcmISDV4.c @@ -477,7 +477,13 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) /* Got 2FGT. Send the first one if received */ if (ds->proximity || (!ds->proximity && last->proximity)) + { + /* time stamp for 2FGT gesture events */ + if ((ds->proximity && !last->proximity) || + (!ds->proximity && last->proximity)) + ds->sample = (int)GetTimeInMillis(); xf86WcmEvent(common, channel, ds); + } channel = 1; ds = &common->wcmChannel[channel].work; @@ -487,6 +493,10 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) ds->device_type = TOUCH_ID; ds->device_id = TOUCH_DEVICE_ID; ds->proximity = data[0] & 0x02; + /* time stamp for 2FGT gesture events */ + if ((ds->proximity && !lastTemp->proximity) || + (!ds->proximity && lastTemp->proximity)) + ds->sample = (int)GetTimeInMillis(); } } |