xcb_poll_for_event: Return already-read events before read(2)ing again.
This commit is contained in:
parent
2ec1383a68
commit
e20a31d72b
|
@ -403,7 +403,8 @@ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c)
|
||||||
{
|
{
|
||||||
_xcb_lock_io(c);
|
_xcb_lock_io(c);
|
||||||
/* FIXME: follow X meets Z architecture changes. */
|
/* FIXME: follow X meets Z architecture changes. */
|
||||||
if(_xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
|
ret = get_event(c);
|
||||||
|
if(!ret && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
|
||||||
ret = get_event(c);
|
ret = get_event(c);
|
||||||
_xcb_unlock_io(c);
|
_xcb_unlock_io(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue