wayland: just to be sure, check return value of wl_display_read_events()

This commit is contained in:
Daniel Eklöf 2020-01-10 19:23:08 +01:00
parent 832e6f1370
commit 7ce2cca49a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -570,7 +570,10 @@ fdm_wayl(struct fdm *fdm, int fd, int events, void *data)
int event_count = 0;
if (events & EPOLLIN) {
wl_display_read_events(wayl->display);
if (wl_display_read_events(wayl->display) < 0) {
LOG_ERRNO("failed to read events from the Wayland socket");
return false;
}
while (wl_display_prepare_read(wayl->display) != 0)
wl_display_dispatch_pending(wayl->display);