From: Axel Wagner Date: Sat, 7 Aug 2010 00:20:01 +0000 (+0200) Subject: Use a while-loop in xcb_chk_cb() to account for the xcb-buffer X-Git-Tag: 4.0.1~7^2~84 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6780d87593a6fd443ad7799015e9af3c595db723;p=i3%2Fi3 Use a while-loop in xcb_chk_cb() to account for the xcb-buffer --- diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 2b339412..055775fb 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -137,12 +137,10 @@ void xcb_prep_cb(struct ev_loop *loop, ev_prepare *watcher, int revenst) { * of the watchers registered an event. * We check wether an X-Event arrived and handle it. * - * FIXME: use a while-loop, to account for the xcb buffer - * */ void xcb_chk_cb(struct ev_loop *loop, ev_check *watcher, int revents) { xcb_generic_event_t *event; - if ((event = xcb_poll_for_event(xcb_connection)) == NULL) { + while ((event = xcb_poll_for_event(xcb_connection)) == NULL) { return; }