diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-14 13:51:12 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-19 09:08:32 +1000 |
commit | 93c2a1628a9f6e7480d834bf55c080997fd18911 (patch) | |
tree | 87564347d84228e3160d44735078d690fb51bb79 /include | |
parent | 3390d3fc0347947796aa245d70fefecf59b7bfe4 (diff) |
Hook up the ownership events
This patch applies most of the protocol conversions and the internal event
type for ownership events.
Note that ownership events are generated by the DIX only, they do not pass
through the event queue.
Co-authored-by: Daniel Stone <daniel@fooishbar.org>
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/events.h | 1 | ||||
-rw-r--r-- | include/eventstr.h | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/events.h b/include/events.h index 375173adc..222cc3d19 100644 --- a/include/events.h +++ b/include/events.h @@ -26,6 +26,7 @@ #define EVENTS_H typedef struct _DeviceEvent DeviceEvent; typedef struct _DeviceChangedEvent DeviceChangedEvent; +typedef struct _TouchOwnershipEvent TouchOwnershipEvent; #if XFreeXDGA typedef struct _DGAEvent DGAEvent; #endif diff --git a/include/eventstr.h b/include/eventstr.h index 332307374..e4410a79f 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -53,6 +53,7 @@ enum EventType { ET_TouchBegin, ET_TouchUpdate, ET_TouchEnd, + ET_TouchOwnership, ET_Enter, ET_Leave, ET_FocusIn, @@ -123,6 +124,24 @@ struct _DeviceEvent uint32_t flags; /**< Flags to be copied into the generated event */ }; +/** + * Generated internally whenever a touch ownership chain changes - an owner + * has accepted or rejected a touch, or a grab/event selection in the delivery + * chain has been removed. + */ +struct _TouchOwnershipEvent +{ + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< One of EventType */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int deviceid; /**< Device to post this event for */ + int sourceid; /**< The physical source device */ + uint32_t touchid; /**< Touch ID (client_id) */ + uint8_t reason; /**< ::XIAcceptTouch, ::XIRejectTouch */ + uint32_t resource; /**< Provoking grab or event selection */ + uint32_t flags; /**< Flags to be copied into the generated event */ +}; /* Flags used in DeviceChangedEvent to signal if the slave has changed */ #define DEVCHANGE_SLAVE_SWITCH 0x2 @@ -238,6 +257,7 @@ union _InternalEvent { } any; DeviceEvent device_event; DeviceChangedEvent changed_event; + TouchOwnershipEvent touch_ownership_event; #if XFreeXDGA DGAEvent dga_event; #endif |