From 33ea30432f528a80d4e787a6f23a4096ead69154 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 6 Aug 2022 10:27:17 +0200 Subject: Check for error while communicating with Wayland - cont'd. --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 44f0640ae..6178b4c84 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -40,6 +40,7 @@ #include #include #include +#include extern "C" { bool libdecor_get_cursor_settings(char **theme, int *size); } @@ -1068,8 +1069,8 @@ static void fd_callback(int fd, struct wl_display *display) { struct pollfd fds = (struct pollfd) { fd, POLLIN, 0 }; do { if (wl_display_dispatch(display) == -1) { - Fl::fatal("Fatal error while communicating with the Wayland server: errno=%d\n", - wl_display_get_error(display)); + Fl::fatal("Fatal error while communicating with the Wayland server: %s", + strerror(errno)); } } while (poll(&fds, 1, 0) > 0); -- cgit v1.2.3