From: Matheus Horstmann Date: Tue, 30 May 2023 04:49:41 +0000 (-0300) Subject: Use xcb doc X-Git-Tag: 1.14~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=05b22a61eed074d02c119c83594b13e7d74e04e8;p=deb_pkgs%2Fautorandr.git Use xcb doc Signed-off-by: Matheus Horstmann --- diff --git a/contrib/autorandr_launcher/autorandr_launcher.c b/contrib/autorandr_launcher/autorandr_launcher.c index 631c167..80d86f0 100644 --- a/contrib/autorandr_launcher/autorandr_launcher.c +++ b/contrib/autorandr_launcher/autorandr_launcher.c @@ -150,14 +150,9 @@ int main(int argc, char **argv) xcb_timestamp_t last_timestamp = (xcb_timestamp_t) 0; time_t last_time = time(NULL); - while (1) { - - ar_log("Waiting for event\n"); - xcb_generic_event_t *evt = xcb_wait_for_event(c); - if (!evt) { - break; - } - + ar_log("Waiting for event\n"); + xcb_generic_event_t *evt; + while ( (evt = xcb_wait_for_event(c)) ) { ar_log("Event type: %" PRIu8 "\n", evt->response_type); ar_log("screen change masked: %" PRIu8 "\n", evt->response_type &