[PATCH xextproto 1/5] XGE: Add xGESendEventReq

Carlos Garnacho carlosg at gnome.org
Fri Sep 24 11:57:06 PDT 2010


Since xSendEventReq has a fixed size, it can't send xGenericEvents larger than 32bytes, there is a need for an alternative in Xge that is able to deal with variable-size events. The extension version is bumped to 1.1 since a new request has been added.

Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
 ge.h      |    5 +++--
 geproto.h |   13 +++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ge.h b/ge.h
index aca1d8a..f52821b 100644
--- a/ge.h
+++ b/ge.h
@@ -29,7 +29,7 @@
 
 #define GE_NAME         "Generic Event Extension"
 #define GE_MAJOR        1
-#define GE_MINOR        0
+#define GE_MINOR        1
 
 /*********************************************************
  *
@@ -38,8 +38,9 @@
  */
 
 #define X_GEQueryVersion        0
+#define X_GESendEvent           1
 
-#define GENumberRequests       (X_GEQueryVersion + 1)
+#define GENumberRequests       (X_GESendEvent + 1)
 
 /*********************************************************
  *
diff --git a/geproto.h b/geproto.h
index c8860dd..0c70e5f 100644
--- a/geproto.h
+++ b/geproto.h
@@ -81,5 +81,18 @@ typedef struct {
 
 #define sz_xGEQueryVersionReply    32
 
+typedef struct {
+    CARD8   reqType;
+    CARD8   ReqType;
+    CARD16  length B16;
+    CARD8   propagate;
+    CARD8   pad1;
+    CARD16  pad2;
+    CARD32  destination B32;
+    CARD32  eventMask B32;
+} xGESendEventReq;
+
+#define sz_xGESendEventReq    16
+
 #endif /* _GEPROTO_H_ */
 
-- 
1.7.0.4



More information about the xorg-devel mailing list