swayidle: terminate when server died

Fixes #1977.
This commit is contained in:
Dominique Martinet 2018-05-16 11:25:55 +09:00
parent 76bdbe938f
commit 620b269418

View file

@ -340,6 +340,9 @@ void sig_handler(int signal) {
} }
static int display_event(int fd, uint32_t mask, void *data) { static int display_event(int fd, uint32_t mask, void *data) {
if (mask & WL_EVENT_HANGUP) {
sway_terminate(0);
}
wl_display_dispatch(state.display); wl_display_dispatch(state.display);
return 0; return 0;
} }