mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Merge pull request #1990 from martinetd/swayidle_terminate
swayidle: terminate when server died
This commit is contained in:
commit
c7c2e5357c
1 changed files with 7 additions and 1 deletions
|
@ -340,7 +340,13 @@ void sig_handler(int signal) {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue