Skip to content

Commit 05b22a6

Browse files
horstmannmatphillipberndt
authored andcommitted
Use xcb doc
Signed-off-by: Matheus Horstmann <[email protected]>
1 parent d9b7d0b commit 05b22a6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

contrib/autorandr_launcher/autorandr_launcher.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,9 @@ int main(int argc, char **argv)
150150

151151
xcb_timestamp_t last_timestamp = (xcb_timestamp_t) 0;
152152
time_t last_time = time(NULL);
153-
while (1) {
154-
155-
ar_log("Waiting for event\n");
156-
xcb_generic_event_t *evt = xcb_wait_for_event(c);
157-
if (!evt) {
158-
break;
159-
}
160-
153+
ar_log("Waiting for event\n");
154+
xcb_generic_event_t *evt;
155+
while ( (evt = xcb_wait_for_event(c)) ) {
161156
ar_log("Event type: %" PRIu8 "\n", evt->response_type);
162157
ar_log("screen change masked: %" PRIu8 "\n",
163158
evt->response_type &

0 commit comments

Comments
 (0)