Revert "[awesome] Remove the two level event loops"
This reverts commit 88c9671ab1
.
Conflicts:
awesome.c
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
932ef459b8
commit
3c6f9a8fa0
26
awesome.c
26
awesome.c
|
@ -511,13 +511,31 @@ 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)))
|
||||
{
|
||||
xcb_handle_event(globalconf.evenths, ev);
|
||||
p_delete(&ev);
|
||||
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(NULL);
|
||||
layout_refresh(NULL);
|
||||
|
||||
/* need to resync */
|
||||
xcb_aux_sync(globalconf.connection);
|
||||
}
|
||||
statusbar_refresh(NULL);
|
||||
layout_refresh(NULL);
|
||||
xcb_aux_sync(globalconf.connection);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue