Commit 593c3e2e authored by Peter Hutterer's avatar Peter Hutterer

dix: add TouchResourceIsOwner helper function

The first listener in the sequence is the owner of the touch sequence.
Signed-off-by: default avatarPeter Hutterer <>
Reviewed-by: default avatarChase Douglas <>
parent 5d0260cc
......@@ -618,6 +618,16 @@ TouchGetPointerEventType(const InternalEvent *event)
* @returns TRUE if the specified grab or selection is the current owner of
* the touch sequence.
TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
return (ti->listeners[0].listener == resource);
* Add the resource to this touch's listeners.
......@@ -611,6 +611,7 @@ 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);
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
enum TouchListenerType type, enum TouchListenerState state);
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
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