summaryrefslogtreecommitdiff
path: root/src/glx/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glxcmds.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 93fc40c284..ec5ec4c3f0 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -865,7 +865,6 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap)
PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
{
- xGLXSwapBuffersReq *req;
GLXContext gc;
GLXContextTag tag;
CARD8 opcode;
@@ -896,6 +895,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);
@@ -906,6 +912,7 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
UnlockDisplay(dpy);
SyncHandle();
XFlush(dpy);
+#endif /* USE_XCB */
}