From b65a75a6e130c2780ffba8a865a12eb1580d8801 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 13 May 2018 19:32:16 -0400 Subject: [PATCH] swayidle: use wl_event_loop_dispatch_idle Fixes #1977 --- swayidle/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swayidle/main.c b/swayidle/main.c index 0eb9e202..935143f0 100644 --- a/swayidle/main.c +++ b/swayidle/main.c @@ -407,8 +407,9 @@ int main(int argc, char *argv[]) { wl_event_loop_add_fd(state.event_loop, wl_display_get_fd(state.display), WL_EVENT_READABLE, display_event, NULL); - while (wl_event_loop_dispatch(state.event_loop, 0) != -1) { - ; //Intentionally left blank; + while (1) { + wl_event_loop_dispatch_idle(state.event_loop); } + sway_terminate(0); }