From 05b22a61eed074d02c119c83594b13e7d74e04e8 Mon Sep 17 00:00:00 2001 From: Matheus Horstmann Date: Tue, 30 May 2023 01:49:41 -0300 Subject: [PATCH] Use xcb doc Signed-off-by: Matheus Horstmann --- contrib/autorandr_launcher/autorandr_launcher.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 & -- 2.39.2