remove two levels polling
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
86cb01685b
commit
0ea4ce4980
21
awesome.c
21
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);
|
||||
}
|
||||
|
||||
layout_refresh();
|
||||
statusbar_refresh();
|
||||
titlebar_refresh();
|
||||
|
||||
xcb_aux_sync(globalconf.connection);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue