mirror of
https://github.com/swaywm/sway.git
synced 2024-11-12 05:24:11 +01:00
Merge pull request #1990 from martinetd/swayidle_terminate
swayidle: terminate when server died
This commit is contained in:
commit
c7c2e5357c
@ -340,7 +340,13 @@ 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) {
|
||||||
wl_display_dispatch(state.display);
|
if (mask & WL_EVENT_HANGUP) {
|
||||||
|
sway_terminate(0);
|
||||||
|
}
|
||||||
|
if (wl_display_dispatch(state.display) < 0) {
|
||||||
|
wlr_log_errno(L_ERROR, "wl_display_dispatch failed, exiting");
|
||||||
|
sway_terminate(0);
|
||||||
|
};
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user