From 660b7d05f4ca4ab4661c9fe7ce655a4909b4e556 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Fri, 16 Apr 2010 19:45:11 -0700 Subject: [PATCH] Fix _XSend to enqueue the right range of pending requests. _XSend was off-by-one on both ends. It should not re-enqueue the last request that was already flushed, but it should enqueue the last request currently being flushed. Signed-off-by: Jamey Sharp Reviewed-by: Josh Triplett --- src/xcb_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xcb_io.c b/src/xcb_io.c index 77287d7b..bd781662 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -357,7 +357,7 @@ void _XSend(Display *dpy, const char *data, long size) if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers) { uint64_t sequence; - for(sequence = dpy->xcb->last_flushed; sequence < dpy->request; ++sequence) + for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy->request; ++sequence) append_pending_request(dpy, sequence); } requests = dpy->request - dpy->xcb->last_flushed;