summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-04-16 19:45:11 -0700
committerJamey Sharp <jamey@minilop.net>2010-04-18 01:28:33 -0700
commit660b7d05f4ca4ab4661c9fe7ce655a4909b4e556 (patch)
tree30e59a832a64b478318565fa2876f0af262592a0
parentf2735889908d6e5a7f8dbee42f00c54a52665191 (diff)
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 <jamey@minilop.net> Reviewed-by: Josh Triplett <josh@freedesktop.org>
-rw-r--r--src/xcb_io.c2
1 files changed, 1 insertions, 1 deletions
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;