mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2025-01-13 08:01:20 +01:00
swaybar: log Wayland display errors
This commit is contained in:
parent
a71bbdd322
commit
daf9ad1af7
1 changed files with 8 additions and 0 deletions
|
@ -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