mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
Check for error while communicating with Wayland.
This commit is contained in:
@@ -1065,11 +1065,13 @@ static const struct wl_registry_listener registry_listener = {
|
|||||||
|
|
||||||
|
|
||||||
static void fd_callback(int fd, struct wl_display *display) {
|
static void fd_callback(int fd, struct wl_display *display) {
|
||||||
struct pollfd fds;
|
struct pollfd fds = (struct pollfd) { fd, POLLIN, 0 };
|
||||||
fds.fd = fd;
|
do {
|
||||||
fds.events = POLLIN;
|
if (wl_display_dispatch(display) == -1) {
|
||||||
fds.revents = 0;
|
Fl::fatal("Fatal error while communicating with the Wayland server: errno=%d\n",
|
||||||
do wl_display_dispatch(display);
|
wl_display_get_error(display));
|
||||||
|
}
|
||||||
|
}
|
||||||
while (poll(&fds, 1, 0) > 0);
|
while (poll(&fds, 1, 0) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user