diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-14 16:30:05 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-21 12:38:35 +1000 |
commit | 593c3e2eb3da5c5fb957b68c8025dfdbe1139639 (patch) | |
tree | 100e7b7018ba174a055f8bc7097b9fe719b6a47b /dix | |
parent | 5d0260cc986e8c1f0907870b851d47fd73bb1b7d (diff) |
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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/touch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dix/touch.c b/dix/touch.c index 7207fd680..3e45e35a4 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -619,6 +619,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. */ void |