backend/wayland: log when getting disconnected from remote display

It can be a bit confusing to understand why a compositor is shutting
down on its own. Log a message when we get disconnected from the
parent compositor to explain the cause.
This commit is contained in:
Simon Ser 2023-06-26 19:40:52 +02:00 committed by Simon Zeni
parent 60d72724cd
commit 3f0d338643

View file

@ -58,6 +58,8 @@ static int dispatch_events(int fd, uint32_t mask, void *data) {
if ((mask & WL_EVENT_HANGUP) || (mask & WL_EVENT_ERROR)) { if ((mask & WL_EVENT_HANGUP) || (mask & WL_EVENT_ERROR)) {
if (mask & WL_EVENT_ERROR) { if (mask & WL_EVENT_ERROR) {
wlr_log(WLR_ERROR, "Failed to read from remote Wayland display"); wlr_log(WLR_ERROR, "Failed to read from remote Wayland display");
} else {
wlr_log(WLR_DEBUG, "Disconnected from remote Wayland display");
} }
wlr_backend_destroy(&wl->backend); wlr_backend_destroy(&wl->backend);
return 0; return 0;