mirror of
https://github.com/swaywm/sway
synced 2024-11-18 00:24:17 +01:00
swayidle: terminate if wl_display_dispatch failed
This commit is contained in:
parent
620b269418
commit
3b7cae0e31
@ -343,7 +343,10 @@ static int display_event(int fd, uint32_t mask, void *data) {
|
|||||||
if (mask & WL_EVENT_HANGUP) {
|
if (mask & WL_EVENT_HANGUP) {
|
||||||
sway_terminate(0);
|
sway_terminate(0);
|
||||||
}
|
}
|
||||||
wl_display_dispatch(state.display);
|
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