aboutsummaryrefslogtreecommitdiff
path: root/libxcb
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb')
-rw-r--r--libxcb/src/xcb_in.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libxcb/src/xcb_in.c b/libxcb/src/xcb_in.c
index e0e7a7cac..ccfb3e0f4 100644
--- a/libxcb/src/xcb_in.c
+++ b/libxcb/src/xcb_in.c
@@ -541,7 +541,7 @@ static xcb_generic_event_t *poll_for_next_event(xcb_connection_t *c, int queued)
pthread_mutex_lock(&c->iolock);
/* FIXME: follow X meets Z architecture changes. */
ret = get_event(c);
- if(!ret && !queued && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
+ if(!ret && !queued && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
ret = get_event(c);
pthread_mutex_unlock(&c->iolock);
}