[PATCH 1/2] input: Pull TouchListener declaration to top-level
Keith Packard
keithp at keithp.com
Tue Nov 27 11:21:16 PST 2012
No reason to have a struct declared inside another struct
Signed-off-by: Keith Packard <keithp at keithp.com>
---
include/inputstr.h | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/inputstr.h b/include/inputstr.h
index 5a38924..8d9dd71 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -298,6 +298,15 @@ typedef struct _ValuatorClassRec {
int v_scroll_axis; /* vert smooth-scrolling axis */
} ValuatorClassRec;
+typedef struct _TouchListener {
+ XID listener; /* grabs/event selection IDs receiving
+ * events for this touch */
+ enum TouchListenerType type;
+ enum TouchListenerState state;
+ enum InputLevel level; /* matters only for emulating touches */
+ WindowPtr window;
+} TouchListener;
+
typedef struct _TouchPointInfo {
uint32_t client_id; /* touch ID as seen in client events */
int sourceid; /* Source device's ID for this touchpoint */
@@ -306,14 +315,7 @@ typedef struct _TouchPointInfo {
* but still owned by a grab */
SpriteRec sprite; /* window trace for delivery */
ValuatorMask *valuators; /* last recorded axis values */
- struct _TouchListener {
- XID listener; /* grabs/event selection IDs receiving
- * events for this touch */
- enum TouchListenerType type;
- enum TouchListenerState state;
- enum InputLevel level; /* matters only for emulating touches */
- WindowPtr window;
- } *listeners;
+ TouchListener *listeners; /* set of listeners */
int num_listeners;
int num_grabs; /* number of open grabs on this touch
* which have not accepted or rejected */
--
1.7.10.4
More information about the xorg-devel
mailing list