[PATCH evdev 3/7] take the tracking ID event into account
Benjamin Tissoires
tissoire at cena.fr
Sat Dec 19 02:17:36 PST 2009
Signed-off-by: Benjamin Tissoires <tissoire at cena.fr>
---
src/evdev.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 470a3f7..bf0b792 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -677,6 +677,18 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
}
/**
+ * Take the trackingID input event and process it accordingly.
+ */
+static void
+EvdevProcessTrackingIDEvent(InputInfoPtr pInfo, struct input_event *ev)
+{
+ // begining of a new touch
+ EvdevPtr pEvdev = pInfo->private;
+
+ pEvdev->current_id = ev->value;
+}
+
+/**
* Process the events from the device; nothing is actually posted to the server
* until an EV_SYN event is received.
*/
@@ -688,7 +700,11 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
EvdevProcessRelativeMotionEvent(pInfo, ev);
break;
case EV_ABS:
- EvdevProcessAbsoluteMotionEvent(pInfo, ev);
+ if (ev->code == ABS_MT_TRACKING_ID){
+ EvdevProcessTrackingIDEvent(pInfo, ev);
+ } else {
+ EvdevProcessAbsoluteMotionEvent(pInfo, ev);
+ }
break;
case EV_KEY:
EvdevProcessKeyEvent(pInfo, ev);
--
1.6.5.2
--------------090208080606020807080800
Content-Type: text/x-patch;
name="0004-adding-to-evdev-the-virtual-subdevices-that-manage-t.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename*0="0004-adding-to-evdev-the-virtual-subdevices-that-manage-t.pa";
filename*1="tch"
More information about the xorg-devel
mailing list