aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-05-16 11:25:55 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-05-16 11:26:13 +0900
commit620b269418f79425168919f2215184dd0277272b (patch)
tree3adf6d47aaff6d8ee6de64cb01caca977e78278a
parent76bdbe938f2e59da2f8685637b8d2073487c405b (diff)
swayidle: terminate when server died
Fixes #1977.
-rw-r--r--swayidle/main.c3
1 files changed, 3 insertions, 0 deletions
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;
}