[awesome] Remove the two level event loops
This should not be needed anymore with XCB. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
e25434fe25
commit
88c9671ab1
26
awesome.c
26
awesome.c
|
@ -511,31 +511,13 @@ main(int argc, char **argv)
|
||||||
if(dbusfd >= 0 && FD_ISSET(dbusfd, &rd))
|
if(dbusfd >= 0 && FD_ISSET(dbusfd, &rd))
|
||||||
a_dbus_process_requests(&dbusfd);
|
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)))
|
while((ev = xcb_poll_for_event(globalconf.connection)))
|
||||||
{
|
{
|
||||||
do
|
xcb_handle_event(globalconf.evenths, ev);
|
||||||
{
|
p_delete(&ev);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
statusbar_refresh();
|
||||||
|
layout_refresh();
|
||||||
xcb_aux_sync(globalconf.connection);
|
xcb_aux_sync(globalconf.connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue