diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-05-16 11:25:55 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-05-16 11:26:13 +0900 |
commit | 620b269418f79425168919f2215184dd0277272b (patch) | |
tree | 3adf6d47aaff6d8ee6de64cb01caca977e78278a | |
parent | 76bdbe938f2e59da2f8685637b8d2073487c405b (diff) |
swayidle: terminate when server died
Fixes #1977.
-rw-r--r-- | swayidle/main.c | 3 |
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; } |