[PATCH] Fix swap complete event size

Jesse Barnes jbarnes at virtuousgeek.org
Thu Apr 28 13:27:20 PDT 2011


XEvents are limited to 32 bytes, so use some creative stuffing to fit
all the bits we'd like to supply.
---
 configure.ac |    2 +-
 dri2proto.h  |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b78d6b..9505f56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([DRI2Proto], [2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([DRI2Proto], [2.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
diff --git a/dri2proto.h b/dri2proto.h
index 9708a4a..e568c91 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -35,7 +35,7 @@
 
 #define DRI2_NAME			"DRI2"
 #define DRI2_MAJOR			1
-#define DRI2_MINOR			3
+#define DRI2_MINOR			4
 
 #define DRI2NumberErrors		0
 #define DRI2NumberEvents		2
@@ -287,16 +287,17 @@ typedef struct {
 
 typedef struct {
     CARD8 type;
-    CARD8 pad;
+    CARD8 sbc_lo0;
     CARD16 sequenceNumber B16;
-    CARD16 event_type B16;
+    CARD8 event_type;
+    CARD8 sbc_lo8;
+    CARD16 sbc_lo16 B16;
     CARD32 drawable B32;
     CARD32 ust_hi B32;
     CARD32 ust_lo B32;
     CARD32 msc_hi B32;
     CARD32 msc_lo B32;
     CARD32 sbc_hi B32;
-    CARD32 sbc_lo B32;
 } xDRI2BufferSwapComplete;
 #define sz_xDRI2BufferSwapComplete 32
 
-- 
1.7.1



More information about the xorg-devel mailing list