aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--wayland.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1857c631..1d325c60 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,8 @@
* Crash in scrollback search mode when selection has been canceled due
to terminal content updates
(https://codeberg.org/dnkl/foot/issues/644).
+* Foot process not terminating when the Wayland connection is broken
+ (https://codeberg.org/dnkl/foot/issues/651).
### Security
diff --git a/wayland.c b/wayland.c
index a83ef59d..7e9ba629 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1163,7 +1163,15 @@ fdm_wayl(struct fdm *fdm, int fd, int events, void *data)
if (events & EPOLLHUP) {
LOG_WARN("disconnected from Wayland");
- wl_display_cancel_read(wayl->display);
+ /*
+ * Do *not* call wl_display_cancel_read() here.
+ *
+ * Doing so causes later calls to wayl_roundtrip() (called
+ * from term_destroy() -> wayl_win_destroy()) to hang
+ * indefinitely.
+ *
+ * https://codeberg.org/dnkl/foot/issues/651
+ */
return false;
}