]> git.sur5r.net Git - i3/i3/commitdiff
Use a while-loop in xcb_chk_cb() to account for the xcb-buffer
authorAxel Wagner <mail@merovius.de>
Sat, 7 Aug 2010 00:20:01 +0000 (02:20 +0200)
committerAxel Wagner <mail@merovius.de>
Sat, 7 Aug 2010 00:20:01 +0000 (02:20 +0200)
i3bar/src/xcb.c

index 2b33941258f89330cb83c003d77265614c0f10e6..055775fb171b63bc2679d68cd67f9317013288e2 100644 (file)
@@ -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;
     }