sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit daf9ad1af73a0358fdabc29ca5817511c16e15a4
parent a71bbdd3220540b56848f10739ccb2226e2b8f97
Author: Simon Ser <contact@emersion.fr>
Date:   Thu,  8 Jul 2021 13:17:15 +0200

swaybar: log Wayland display errors

Diffstat:
Mswaybar/bar.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/swaybar/bar.c b/swaybar/bar.c @@ -461,7 +461,15 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) { static void display_in(int fd, short mask, void *data) { struct swaybar *bar = data; + if (mask & (POLLHUP | POLLERR)) { + if (mask & POLLERR) { + sway_log(SWAY_ERROR, "Wayland display poll error"); + } + bar->running = false; + return; + } if (wl_display_dispatch(bar->display) == -1) { + sway_log(SWAY_ERROR, "wl_display_dispatch failed"); bar->running = false; } }