From ebacb14be80d7d10bc4f0a2c8eb9238c283abecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 3 Mar 2026 17:38:46 +0100 Subject: [PATCH 01/10] changelog: add new 'unreleased' section --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9319875..0f02e550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#unreleased) * [1.26.0](#1-26-0) * [1.25.0](#1-25-0) * [1.24.0](#1-24-0) @@ -67,6 +68,16 @@ * [1.2.0](#1-2-0) +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.26.0 ### Added From c05bd55029b8a9bb57df246fec9acc786d71d16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 5 Mar 2026 16:17:09 +0100 Subject: [PATCH 02/10] doc: foot.ini: fix default value of initial-color-theme Closes #2292 --- CHANGELOG.md | 7 +++++++ doc/foot.ini.5.scd | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f02e550..30a73369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,13 @@ ### Deprecated ### Removed ### Fixed + +* Wrong documented default value for `initial-color-theme` in + `foot.ini(5)` ([#2292][2292]). + +[2292]: https://codeberg.org/dnkl/foot/issues/2292 + + ### Security ### Contributors diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 2f5fc38c..a1ee326f 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -392,7 +392,7 @@ empty string to be set, but it must be quoted: *KEY=""* at runtime, or send SIGUSR1/SIGUSR2 to the foot process (see *foot*(1) for details). - Default: _1_ + Default: _dark_ *initial-window-size-pixels* Initial window width and height in _pixels_ (subject to output From f49fdf7ca3a69d987407c4c1965e32697fb671d7 Mon Sep 17 00:00:00 2001 From: Roshless Date: Thu, 5 Mar 2026 19:11:44 +0100 Subject: [PATCH 03/10] themes: paper-color-light: fix newline --- themes/paper-color-light | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/paper-color-light b/themes/paper-color-light index 2f7a8003..554aabc0 100644 --- a/themes/paper-color-light +++ b/themes/paper-color-light @@ -4,7 +4,7 @@ [main] initial-color-theme=light -xs + [colors-light] cursor=eeeeee 444444 background=eeeeee From 4fd682b4e8d985ce25d2bd599c1d855bc1489650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 10 Mar 2026 07:59:40 +0100 Subject: [PATCH 04/10] meson: clang: add -Wno-wc2y-extensions Recent clang versions warn on __COUNTER__, unless compiling with -std=c2y (which breaks other things). "Fixes" '__COUNTER__' is a C2y extension (__COUNTER__ is used by our UNITTEST macro). --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 66b3d6bc..16e8e3c0 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,11 @@ is_debug_build = get_option('buildtype').startswith('debug') cc = meson.get_compiler('c') +# Newer clang versions warns when using __COUNTER__ without -std=c2y +if cc.has_argument('-Wc2y-extensions') + add_project_arguments('-Wno-c2y-extensions', language: 'c') +endif + if cc.has_function('memfd_create', args: ['-D_GNU_SOURCE'], prefix: '#include ') From 657db18a4ec4df93689c3eaae03b70f851724001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 10 Mar 2026 07:46:03 +0100 Subject: [PATCH 05/10] wayland: do all surface unmap and roundtrips before waiting for pre-apply damage The pre-apply damage thread may be running when we destroy a terminal instance, and we need to wait for it to finish before destroying the underlying buffer. c291194a4e593bbbb91420e81fa0111508084448 did this, but failed to realize the thread may get re-started in the roundtrips done later in wayl_win_destroy(); after the wait added in c291194a4e593bbbb91420e81fa0111508084448, we unmap all surfaces (including the main grid), and roundtrip. This means the compositor will release the currently active buffer, and that means _we_ will trigger the pre-apply damage thread on it. This introduces a race, where wayl_win_destroy() may reach its shm_purge() calls before the pre-apply damage thread has finished. That typically causes foot to crash. Closes #2288 --- CHANGELOG.md | 3 +++ wayland.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30a73369..30b3e1e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,8 +77,11 @@ * Wrong documented default value for `initial-color-theme` in `foot.ini(5)` ([#2292][2292]). +* Occasional crashes when closing a window and + `tweak.pre-apply-damage=yes` (the default) ([#2288][2288]). [2292]: https://codeberg.org/dnkl/foot/issues/2292 +[2288]: https://codeberg.org/dnkl/foot/issues/2288 ### Security diff --git a/wayland.c b/wayland.c index 1d258213..1ffd62a6 100644 --- a/wayland.c +++ b/wayland.c @@ -2177,8 +2177,6 @@ wayl_win_destroy(struct wl_window *win) struct terminal *term = win->term; - render_wait_for_preapply_damage(term); - if (win->csd.move_timeout_fd != -1) close(win->csd.move_timeout_fd); @@ -2236,6 +2234,8 @@ wayl_win_destroy(struct wl_window *win) tll_remove(win->urls, it); } + render_wait_for_preapply_damage(term); + csd_destroy(win); wayl_win_subsurface_destroy(&win->search); wayl_win_subsurface_destroy(&win->scrollback_indicator); From eed2d668ecdb0705142d27950a6d8c1923df32f1 Mon Sep 17 00:00:00 2001 From: vlkrs Date: Thu, 12 Mar 2026 18:47:50 +0100 Subject: [PATCH 06/10] OpenBSD has UTF-32 --- char32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/char32.c b/char32.c index 3d6c2c78..be5bf229 100644 --- a/char32.c +++ b/char32.c @@ -34,7 +34,7 @@ _Static_assert( #if !defined(__STDC_UTF_32__) || !__STDC_UTF_32__ #error "char32_t does not use UTF-32" #endif -#if (!defined(__STDC_ISO_10646__) || !__STDC_ISO_10646__) && !defined(__FreeBSD__) +#if (!defined(__STDC_ISO_10646__) || !__STDC_ISO_10646__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #error "wchar_t does not use UTF-32" #endif From 370adaf6975c7128107d187928c7f9cdff247930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 14 Mar 2026 08:35:15 +0100 Subject: [PATCH 07/10] changelog: prepare for 1.26.1 --- CHANGELOG.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b3e1e4..b62f5c92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -* [Unreleased](#unreleased) +* [1.26.1](#1-26-1) * [1.26.0](#1-26-0) * [1.25.0](#1-25-0) * [1.24.0](#1-24-0) @@ -68,11 +68,8 @@ * [1.2.0](#1-2-0) -## Unreleased -### Added -### Changed -### Deprecated -### Removed +## 1.26.1 + ### Fixed * Wrong documented default value for `initial-color-theme` in @@ -84,9 +81,11 @@ [2288]: https://codeberg.org/dnkl/foot/issues/2288 -### Security ### Contributors +* Roshless +* vlkrs + ## 1.26.0 From ef15414b301513a75193fd872de79d6379f41a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 14 Mar 2026 08:35:28 +0100 Subject: [PATCH 08/10] meson: bump version to 1.26.1 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 16e8e3c0..a0e602bb 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('foot', 'c', - version: '1.26.0', + version: '1.26.1', license: 'MIT', meson_version: '>=0.59.0', default_options: [ From 2fb7bb0ea4a240c6a8d921698d89d6044dea16e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 14 Mar 2026 08:38:15 +0100 Subject: [PATCH 09/10] changelog: add new 'unreleased' section --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62f5c92..a0654b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#unreleased) * [1.26.1](#1-26-1) * [1.26.0](#1-26-0) * [1.25.0](#1-25-0) @@ -68,6 +69,16 @@ * [1.2.0](#1-2-0) +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.26.1 ### Fixed From 037a2f4fa2c6fab014248d62efa8a6e14f617832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 21 Mar 2026 14:43:27 +0100 Subject: [PATCH 10/10] term: enqueue data to slave if there are queued paste data buffers When writing paste data to the terminal (either interactively, or as an OSC-52 reply), we enqueue other data (key presses, for examples, or query replies) while the paste is happening. The idea is to send the key press _after_ all paste data has been written, to ensure consistency. Unfortunately, we only checked for an on-going paste. I.e. where the paste itself hasn't yet finished. It is also possible the paste itself has finished, but we haven't yet flushed all the paste buffers. That is, if we were able to *receive* paste data faster than the terminal client was able to *consume* it. In this case, we've queued up paste data in the terminal. These are in separate queues, and when emitting e.g. a key press, we didn't check if all _those_ queues had been flushed yet. Closes #2307 --- CHANGELOG.md | 7 +++++++ terminal.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0654b08..f554124b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,13 @@ ### Deprecated ### Removed ### Fixed + +* Other output (key presses, query replies etc) being mixed with paste + data, both interactive pastes and OSC-52 ([#2307][2307]). + +[2307]: https://codeberg.org/dnkl/foot/issues/2307 + + ### Security ### Contributors diff --git a/terminal.c b/terminal.c index ac7922a7..8eafbcbe 100644 --- a/terminal.c +++ b/terminal.c @@ -120,7 +120,10 @@ term_to_slave(struct terminal *term, const void *data, size_t len) return false; } - if (tll_length(term->ptmx_buffers) > 0 || term->is_sending_paste_data) { + if (unlikely(tll_length(term->ptmx_buffers) > 0 || + term->is_sending_paste_data || + tll_length(term->ptmx_paste_buffers) > 0)) + { /* * Don't even try to send data *now* if there's queued up * data, since that would result in events arriving out of