From 3f0d338643e97de500298bbf378e340705690cce Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 26 Jun 2023 19:40:52 +0200 Subject: [PATCH] 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. --- backend/wayland/backend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index ff95a7b4b..fbae3a3c2 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -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_ERROR) { 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); return 0;