diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-14 15:56:05 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-21 12:38:35 +1000 |
commit | 40475261eacabb79a824db1138407a9d0f9fe37f (patch) | |
tree | 2f999962f3f3f6cd819101a6219b1abe7fdf5b06 /include | |
parent | b274c472a5ad700aea5fe651d677e8cb34ffc976 (diff) |
dix: add touch event history helper functions
If touch client has not registered for ownership events and a grab above
that client is rejected, the client needs to receive the complete event
history.
The history currently doesn't really do fancy overflow handling. We assume
that the first TOUCH_HISTORY_SIZE events are the important ones and anything
after that is dropped. If that is a problem, fix the client that takes > 100
event to decide whether to accept or reject.
Events marked with TOUCH_CLIENT_ID or TOUCH_REPLAYING must not be stored in
the history, they are events created by the DIX to comply with the protocol.
Any such event should already be in the history anyway.
A fixme in this patch: we don't have a function to actually deliver the
event yet.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/input.h b/include/input.h index 4d60792cd..8ce5f2b9d 100644 --- a/include/input.h +++ b/include/input.h @@ -607,6 +607,10 @@ extern TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid, extern TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev, uint32_t client_id); extern void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti); +extern Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti); +extern void TouchEventHistoryFree(TouchPointInfoPtr ti); +extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev); +extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource); /* misc event helpers */ extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients); |