diff --git a/awesome.c b/awesome.c index d0b472c6..e2b42fb6 100644 --- a/awesome.c +++ b/awesome.c @@ -151,33 +151,16 @@ a_xcb_check_cb(EV_P_ ev_check *w, int revents) { xcb_generic_event_t *ev; - /* Two level polling: - * We need to first check we have an event to handle - * and if so, we handle them all in a round. - * Then when we have refresh()'ed stuff so maybe new XEvent - * are available and select() won't tell us, so let's check - * with xcb_poll_for_event() again. - */ while((ev = xcb_poll_for_event(globalconf.connection))) { - do - { - xcb_handle_event(globalconf.evenths, ev); - /* need to resync */ - xcb_aux_sync(globalconf.connection); - p_delete(&ev); - } while((ev = xcb_poll_for_event(globalconf.connection))); - - layout_refresh(); - statusbar_refresh(); - titlebar_refresh(); - - /* need to resync */ - xcb_aux_sync(globalconf.connection); + xcb_handle_event(globalconf.evenths, ev); + p_delete(&ev); } + layout_refresh(); statusbar_refresh(); titlebar_refresh(); + xcb_aux_sync(globalconf.connection); }