mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-13 05:33:51 -04:00
wayland: just to be sure, check return value of wl_display_read_events()
This commit is contained in:
parent
832e6f1370
commit
7ce2cca49a
1 changed files with 4 additions and 1 deletions
|
|
@ -570,7 +570,10 @@ fdm_wayl(struct fdm *fdm, int fd, int events, void *data)
|
||||||
int event_count = 0;
|
int event_count = 0;
|
||||||
|
|
||||||
if (events & EPOLLIN) {
|
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)
|
while (wl_display_prepare_read(wayl->display) != 0)
|
||||||
wl_display_dispatch_pending(wayl->display);
|
wl_display_dispatch_pending(wayl->display);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue