X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_in.c;h=e075a40472f006d62f99c0979db5ebe09068dbdb;hb=5ceeaaa4294201b3f613c07f9ec610c0e5f673c7;hp=4acc3a27d2dfdb2e32d87a9ecfa5e1a1467f8f83;hpb=b12038e9ae5343c4176f11d68c963c752bc35c03;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_in.c b/src/xcb_in.c index 4acc3a2..e075a40 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -535,7 +535,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); }