diff options
author | Keith Packard <keithp@keithp.com> | 2008-10-11 21:44:21 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2008-11-04 08:54:01 -0800 |
commit | 2dbaaab9c4e3894b33dcae850551dee5473431d5 (patch) | |
tree | a0d1deab4c636adcd2f1fdc6ad4c558296c12bb3 /src | |
parent | bedfe68259037c5564fe52758c92b9c97729640a (diff) |
Ensure that _XReadEvents always leaves an event in the queue on return
XNextEvent assumes that the event queue will be non-empty on return from
_XReadEvents, but with multiple event readers running, the previous change
could leave the queue empty on return from process_responses. Re-invoke
process_responses until the queue is non-empty.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xcb_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xcb_io.c b/src/xcb_io.c index de5525bc..1fa62ec5 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -267,7 +267,9 @@ void _XReadEvents(Display *dpy) if(dpy->xcb->event_owner != XlibOwnsEventQueue) return; check_internal_connections(dpy); - process_responses(dpy, 1, 0, 0); + do { + process_responses(dpy, 1, 0, 0); + } while (dpy->qlen == 0); } /* |