Commit 6a68f97c authored by Chase Douglas's avatar Chase Douglas Committed by Peter Hutterer

dix: add TouchGetPointerEventType helper function

Returns the respective pointer event type for a given touch event type.
Signed-off-by: default avatarPeter Hutterer <>
Reviewed-by: default avatarChase Douglas <>
parent 8e58ce73
......@@ -593,3 +593,24 @@ TouchEnsureSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
return TRUE;
* Return the corresponding pointer emulation internal event type for the given
* touch event or 0 if no such event type exists.
TouchGetPointerEventType(const InternalEvent *event)
int type = 0;
case ET_TouchBegin: type = ET_ButtonPress; break;
case ET_TouchUpdate: type = ET_Motion; break;
case ET_TouchEnd: type = ET_ButtonRelease; break;
return type;
......@@ -615,6 +615,7 @@ extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID
extern Bool TouchEnsureSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
InternalEvent *ev);
extern Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite);
extern int TouchGetPointerEventType(const InternalEvent *ev);
/* misc event helpers */
extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment