dix: add TouchResourceIsOwner helper function
The first listener in the sequence is the owner of the touch sequence. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
10
dix/touch.c
10
dix/touch.c
@@ -618,6 +618,16 @@ TouchGetPointerEventType(const InternalEvent *event)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns TRUE if the specified grab or selection is the current owner of
|
||||
* the touch sequence.
|
||||
*/
|
||||
Bool
|
||||
TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
|
||||
{
|
||||
return (ti->listeners[0].listener == resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the resource to this touch's listeners.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user