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>
This commit is contained in:
Jamey Sharp 2010-04-16 19:45:11 -07:00
parent f273588990
commit 660b7d05f4

View file

@ -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;