Handle all events, not only one

This commit is contained in:
buffet 2018-11-06 21:52:12 +01:00
parent 3e6eb120ed
commit 858bcd4947

View file

@ -121,17 +121,13 @@ main(int argc, char *argv[])
} }
if (FD_ISSET(g_dpy_fd, &file_descriptors)) { if (FD_ISSET(g_dpy_fd, &file_descriptors)) {
xcb_generic_event_t *event = xcb_poll_for_event(g_dpy); xcb_generic_event_t *event;
while ((event= xcb_poll_for_event(g_dpy))) {
if (!event) {
continue;
}
handle_xcb_event(event); handle_xcb_event(event);
free(event); free(event);
} }
} }
}
free(g_config_path); free(g_config_path);
close(g_sock_fd); close(g_sock_fd);