From 88c9671ab1951f36663d8df7f0510557c9096e72 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 21 May 2008 12:04:50 +0200 Subject: [PATCH] [awesome] Remove the two level event loops This should not be needed anymore with XCB. Signed-off-by: Julien Danjou --- awesome.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/awesome.c b/awesome.c index 9b780870..a19b550e 100644 --- a/awesome.c +++ b/awesome.c @@ -511,31 +511,13 @@ main(int argc, char **argv) if(dbusfd >= 0 && FD_ISSET(dbusfd, &rd)) a_dbus_process_requests(&dbusfd); - /* two level XPending: - * we need to first check we have XEvent 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 XPending() 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))); - - statusbar_refresh(); - layout_refresh(); - - /* need to resync */ - xcb_aux_sync(globalconf.connection); + xcb_handle_event(globalconf.evenths, ev); + p_delete(&ev); } + statusbar_refresh(); + layout_refresh(); xcb_aux_sync(globalconf.connection); }