[PATCH] glx: Use 0 rather than garbage for unknown INTEL_swap_event types

Adam Jackson ajax at redhat.com
Thu Apr 14 13:57:30 PDT 2011


Otherwise the garbage you return could well be numerically identical to
one of the swap type tokens, and apps which rely on us to tell the truth
would be in trouble.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxdri2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index e8961e2..d979717 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -184,6 +184,7 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust,
 	break;
     default:
 	/* unknown swap completion type */
+	wire.event_type = 0;
 	break;
     }
     wire.drawable = drawable->drawId;
-- 
1.7.4.4



More information about the xorg-devel mailing list