From 620b269418f79425168919f2215184dd0277272b Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 16 May 2018 11:25:55 +0900 Subject: [PATCH] swayidle: terminate when server died Fixes #1977. --- swayidle/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swayidle/main.c b/swayidle/main.c index 60235280..15f319c3 100644 --- a/swayidle/main.c +++ b/swayidle/main.c @@ -340,6 +340,9 @@ void sig_handler(int signal) { } static int display_event(int fd, uint32_t mask, void *data) { + if (mask & WL_EVENT_HANGUP) { + sway_terminate(0); + } wl_display_dispatch(state.display); return 0; }