---
 src/glx/x11/glxcmds.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 726ffed..0daa1ef 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -866,7 +866,6 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap 
glxpixmap)
 
 PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
 {
-    xGLXSwapBuffersReq *req;
     GLXContext gc;
     GLXContextTag tag;
     CARD8 opcode;
@@ -897,6 +896,13 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable 
drawable)
        tag = 0;
     }
 
+#ifdef USE_XCB
+    xcb_connection_t* c = XGetXCBConnection(dpy);
+    xcb_glx_swap_buffers(c, tag, drawable);
+    xcb_flush(c);
+#else
+    xGLXSwapBuffersReq *req;
+
     /* Send the glXSwapBuffers request */
     LockDisplay(dpy);
     GetReq(GLXSwapBuffers,req);
@@ -907,6 +913,7 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable 
drawable)
     UnlockDisplay(dpy);
     SyncHandle();
     XFlush(dpy);
+#endif /* USE_XCB */
 }
 
 
-- 
1.6.0.2


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to