diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-11-01 16:06:40 -0400 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-17 15:01:45 +1000 |
commit | e130a46ab45839f91b29ee75bf19a597dfe3da28 (patch) | |
tree | 5320c18af170b6d61f5bf03af5bdbf71c8779882 /include | |
parent | 85a37ddcc2ff49adaec4075532b60e7d015f901c (diff) |
Add support for XI2.3: Pointer barrier events and releases.
This adds support for clients that would like to get a notification
every time a barrier is hit, and allows clients to temporarily release
a barrier so that pointers can go through them, without having to
destroy and recreate barriers.
Based on work by Chris Halse Rogers <chris.halse.rogers@canonical.com>
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/events.h | 1 | ||||
-rw-r--r-- | include/eventstr.h | 22 | ||||
-rw-r--r-- | include/inputstr.h | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/include/events.h b/include/events.h index 222bf328b..c0ef45d5f 100644 --- a/include/events.h +++ b/include/events.h @@ -27,6 +27,7 @@ typedef struct _DeviceEvent DeviceEvent; typedef struct _DeviceChangedEvent DeviceChangedEvent; typedef struct _TouchOwnershipEvent TouchOwnershipEvent; +typedef struct _BarrierEvent BarrierEvent; #if XFreeXDGA typedef struct _DGAEvent DGAEvent; diff --git a/include/eventstr.h b/include/eventstr.h index eddba8775..38fab4f3c 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -72,6 +72,8 @@ enum EventType { ET_RawTouchUpdate, ET_RawTouchEnd, ET_XQuartz, + ET_BarrierHit, + ET_BarrierLeave, ET_Internal = 0xFF /* First byte */ }; @@ -227,6 +229,25 @@ struct _RawDeviceEvent { uint32_t flags; /**< Flags to be copied into the generated event */ }; +struct _BarrierEvent { + unsigned char header; /**< Always ET_Internal */ + enum EventType type; /**< ET_BarrierHit, ET_BarrierLeave */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int deviceid; /**< Device to post this event for */ + int sourceid; /**< The physical source device */ + int barrierid; + Window window; + Window root; + double dx; + double dy; + double root_x; + double root_y; + int16_t dt; + int32_t event_id; + uint32_t flags; +}; + #ifdef XQUARTZ #define XQUARTZ_EVENT_MAXARGS 5 struct _XQuartzEvent { @@ -253,6 +274,7 @@ union _InternalEvent { DeviceEvent device_event; DeviceChangedEvent changed_event; TouchOwnershipEvent touch_ownership_event; + BarrierEvent barrier_event; #if XFreeXDGA DGAEvent dga_event; #endif diff --git a/include/inputstr.h b/include/inputstr.h index bb0a77963..17cee9854 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -71,7 +71,7 @@ extern _X_EXPORT int CountBits(const uint8_t * mask, int len); * events to the protocol, the server will not support these events until * this number here is bumped. */ -#define XI2LASTEVENT XI_RawTouchEnd +#define XI2LASTEVENT XI_BarrierLeave #define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */ /** |