diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-14 13:21:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-16 11:18:47 +1000 |
commit | 3390d3fc0347947796aa245d70fefecf59b7bfe4 (patch) | |
tree | cd75951a6b51b788018e75bd95ed81f1d7edd611 /dix | |
parent | 84db813b9db34975b5fe288a8a551bb98f0cc1c1 (diff) |
Xi: process raw touch events
No-one can generated them yet, but if they could, we'd be processing them
like there was no tomorrow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/eventconvert.c | 12 | ||||
-rw-r--r-- | dix/events.c | 3 | ||||
-rw-r--r-- | dix/getevents.c | 11 |
3 files changed, 25 insertions, 1 deletions
diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 3802ea142..582769ad8 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -158,6 +158,9 @@ EventToCore(InternalEvent *event, xEvent **core_out, int *count_out) case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: @@ -211,6 +214,9 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: @@ -270,6 +276,9 @@ EventToXI2(InternalEvent *ev, xEvent **xi) case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: return eventToRawEvent(&ev->raw_event, xi); default: break; @@ -827,6 +836,9 @@ GetXI2Type(enum EventType type) case ET_RawButtonPress: xi2type = XI_RawButtonPress; break; case ET_RawButtonRelease: xi2type = XI_RawButtonRelease; break; case ET_RawMotion: xi2type = XI_RawMotion; break; + case ET_RawTouchBegin: xi2type = XI_RawTouchBegin; break; + case ET_RawTouchUpdate: xi2type = XI_RawTouchUpdate; break; + case ET_RawTouchEnd: xi2type = XI_RawTouchEnd; break; case ET_FocusIn: xi2type = XI_FocusIn; break; case ET_FocusOut: xi2type = XI_FocusOut; break; case ET_TouchBegin: xi2type = XI_TouchBegin; break; diff --git a/dix/events.c b/dix/events.c index 2b54969d8..f80b8fddf 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2463,6 +2463,9 @@ FixUpEventFromWindow( case XI_RawButtonPress: case XI_RawButtonRelease: case XI_RawMotion: + case XI_RawTouchBegin: + case XI_RawTouchUpdate: + case XI_RawTouchEnd: case XI_DeviceChanged: case XI_HierarchyChanged: case XI_PropertyEvent: diff --git a/dix/getevents.c b/dix/getevents.c index ea62ca8b8..d7d6c09ec 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -161,7 +161,16 @@ init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail) memset(event, 0, sizeof(RawDeviceEvent)); event->header = ET_Internal; event->length = sizeof(RawDeviceEvent); - event->type = ET_RawKeyPress - ET_KeyPress + type; + switch(type) { + case MotionNotify: event->type = ET_RawMotion; break; + case ButtonPress: event->type = ET_RawButtonPress; break; + case ButtonRelease: event->type = ET_RawButtonRelease; break; + case KeyPress: event->type = ET_RawKeyPress; break; + case KeyRelease: event->type = ET_RawKeyRelease; break; + case XI_TouchBegin: event->type = ET_RawTouchBegin; break; + case XI_TouchUpdate: event->type = ET_RawTouchUpdate; break; + case XI_TouchEnd: event->type = ET_RawTouchEnd; break; + } event->time = ms; event->deviceid = dev->id; event->sourceid = dev->id; |