From f8a367896a57d84967d7b537ee618aae8081e2ea Mon Sep 17 00:00:00 2001 From: Marinus Klasen Date: Wed, 19 Aug 2026 23:05:34 +0200 Subject: wayland: clear touch focus in wayl_win_destroy() wl_touch has no leave event, so unmapping the surfaces cannot drop touch focus the way it drops keyboard and pointer focus. seat->touch.surface kept pointing at the window being destroyed, and seat->touch.state stayed HELD/DRAGGING, so the guard in wl_touch_up() and wl_touch_motion() did not fire. A wl_touch.up dispatched from the roundtrips in wayl_win_destroy() then dereferenced the freed window: #0 wl_touch_up () at input.c:3587 #12 wayl_roundtrip () at wayland.c:2416 #13 wayl_win_destroy () at wayland.c:2297 Reproduced by touching a foot window and holding while the window is destroyed: 3/3 crashes before, 0/7 after. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 67b64049..24d0b840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,6 +137,7 @@ * Crash in `select-quote` when the right-side quote appeared right after a newline, in column 0 ([#2405][2405]). * Resizing a terminal window may break current selection. +* Crash when closing a window that touch input focus. [2353]: https://codeberg.org/dnkl/foot/issues/2353 [2352]: https://codeberg.org/dnkl/foot/issues/2352 -- cgit v1.3