mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
wayland: always call wl_display_dispatch_pending() at least once, after reading
This fixes an issue where protocol errors aren't reported. I'm guessing the read succeeds, but that prepare_read() _also_ succeeds immediately, since there aren't any events to dispatch (only log the protocol error). By calling dispatch unconditionally, we ensure any error messages are printed. Then we proceed to loop prepare_read() + dispatch_pending() until the queue is empty.
This commit is contained in:
parent
0ea572dc63
commit
237db6e771
1 changed files with 2 additions and 0 deletions
|
|
@ -1650,6 +1650,8 @@ fdm_wayl(struct fdm *fdm, int fd, int events, void *data)
|
|||
return false;
|
||||
}
|
||||
|
||||
wl_display_dispatch_pending(wayl->display);
|
||||
|
||||
while (wl_display_prepare_read(wayl->display) != 0) {
|
||||
if (wl_display_dispatch_pending(wayl->display) < 0) {
|
||||
LOG_ERRNO("failed to dispatch pending Wayland events");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue