mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
swaybar: log Wayland display errors
This commit is contained in:
parent
a71bbdd322
commit
daf9ad1af7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue