mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
commit
37db94078f
2 changed files with 19 additions and 5 deletions
|
|
@ -126,6 +126,9 @@
|
||||||
* Rare occurrences where the window did not close when the shell
|
* Rare occurrences where the window did not close when the shell
|
||||||
exited. Only seen on FreeBSD
|
exited. Only seen on FreeBSD
|
||||||
(https://codeberg.org/dnkl/foot/issues/534)
|
(https://codeberg.org/dnkl/foot/issues/534)
|
||||||
|
* Foot process(es) sometimes remaining, using 100% CPU, when closing
|
||||||
|
multiple foot windows at the same time
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/542).
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
21
wayland.c
21
wayland.c
|
|
@ -1126,8 +1126,12 @@ fdm_wayl(struct fdm *fdm, int fd, int events, void *data)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (wl_display_prepare_read(wayl->display) != 0)
|
while (wl_display_prepare_read(wayl->display) != 0) {
|
||||||
wl_display_dispatch_pending(wayl->display);
|
if (wl_display_dispatch_pending(wayl->display) < 0) {
|
||||||
|
LOG_ERRNO("failed to dispatch pending Wayland events");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events & EPOLLHUP) {
|
if (events & EPOLLHUP) {
|
||||||
|
|
@ -1589,14 +1593,21 @@ void
|
||||||
wayl_roundtrip(struct wayland *wayl)
|
wayl_roundtrip(struct wayland *wayl)
|
||||||
{
|
{
|
||||||
wl_display_cancel_read(wayl->display);
|
wl_display_cancel_read(wayl->display);
|
||||||
wl_display_roundtrip(wayl->display);
|
if (wl_display_roundtrip(wayl->display) < 0) {
|
||||||
|
LOG_ERRNO("failed to roundtrip Wayland display");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* I suspect the roundtrip above clears the pending queue, and
|
/* I suspect the roundtrip above clears the pending queue, and
|
||||||
* that prepare_read() will always succeed in the first call. But,
|
* that prepare_read() will always succeed in the first call. But,
|
||||||
* better safe than sorry... */
|
* better safe than sorry... */
|
||||||
|
|
||||||
while (wl_display_prepare_read(wayl->display) != 0)
|
while (wl_display_prepare_read(wayl->display) != 0) {
|
||||||
wl_display_dispatch_pending(wayl->display);
|
if (wl_display_dispatch_pending(wayl->display) < 0) {
|
||||||
|
LOG_ERRNO("failed to dispatch pending Wayland events");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
wayl_flush(wayl);
|
wayl_flush(wayl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue