From 3fbbf5f81f8f044e332dae662998086f77702e53 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 20 Mar 2021 14:14:58 +0100 Subject: changelog: add new ‘unreleased’ section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e87711..46e3a5b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#unreleased) * [1.7.0](#1-7-0) * [1.6.4](#1-6-4) * [1.6.3](#1-6-3) @@ -23,6 +24,16 @@ * [1.2.0](#1-2-0) +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.7.0 ### Added -- cgit v1.3 From 0c85905972fdc739fb140e32c3389c08e769bfff Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 21 Mar 2021 11:55:03 +0100 Subject: input: must have all required modifiers to un-shift a symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When detecting, and repairing, “broken” key bindings (where the key binding itself explicitly lists a modifier that is consumed by the final symbol - e.g “Shift+W”), don’t just look for an intersection between the set of modifiers needed to produce the final symbol, and the modifiers listed in the key combo. Instead, check if the key combo has *all* the required modifiers. Example: Shift+AltGr+w produces Page_Down. I.e. Page_Down is the _shifted_ symbol, ‘w’ is the un-shifted symbol, and Shift+AltGr are the modifiers required to shift ‘w’ to Page_Down. If we have the key combo Shift+Page_Down, foot would, correctly, determine that Page_Down is a shifted symbol. It would find the Shift+AltGr modifier set, and since the intersection of “Shift+AltGr” and “Shift” (from our key combo) is non-empty, foot would (incorrectly) determine that we can, and should, replace Page_Down with its un-shifted symbol ‘w’. This is completely wrong, since Shift+w does _not_ produce Page_Down. Closes #407 --- CHANGELOG.md | 5 +++++ input.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e3a5b8..266d9b77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,11 @@ ### Deprecated ### Removed ### Fixed + +* Logic that repairs invalid key bindings ended up breaking valid key + bindings instead (https://codeberg.org/dnkl/foot/issues/407). + + ### Security ### Contributors diff --git a/input.c b/input.c index bc28bbf2..9a26e778 100644 --- a/input.c +++ b/input.c @@ -450,7 +450,7 @@ maybe_repair_key_combo(const struct seat *seat, /* Check if key combo’s modifier set intersects */ for (size_t j = 0; j < mod_mask_count; j++) { - if (!(mod_masks[j] & mods)) + if ((mod_masks[j] & mods) != mod_masks[j]) continue; char combo[64] = {0}; -- cgit v1.3 From 7609fbba472a767849a34ca68b21ceaeccee9565 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 20 Mar 2021 15:32:31 +0100 Subject: term: increase/decrease custom line-height with font size changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the user has set a custom line-height, we now adjust it when increasing/decreasing (“zooming”) the font size at run-time. Previously, the line-height was fixed at the size specified in foot.ini. --- CHANGELOG.md | 2 ++ config.h | 6 ------ terminal.c | 15 +++++++++++++-- terminal.h | 7 +++++++ 4 files changed, 22 insertions(+), 8 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 266d9b77..0e065995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ * Logic that repairs invalid key bindings ended up breaking valid key bindings instead (https://codeberg.org/dnkl/foot/issues/407). +* Custom `line-height` settings now scale when increasing or + decreasing the font size at run-time. ### Security diff --git a/config.h b/config.h index 1fe82257..f8c7aaf0 100644 --- a/config.h +++ b/config.h @@ -53,12 +53,6 @@ struct config_mouse_binding { struct config_binding_pipe pipe; }; -/* If px != 0 then px is valid, otherwise pt is valid */ -struct pt_or_px { - int16_t px; - float pt; -}; - struct config_spawn_template { char *raw_cmd; char **argv; diff --git a/terminal.c b/terminal.c index 68a7a138..cf0e1d13 100644 --- a/terminal.c +++ b/terminal.c @@ -649,8 +649,8 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4]) : term->fonts[0]->max_advance.x) + pt_or_px_as_pixels(term, &conf->letter_spacing); - term->cell_height = conf->line_height.px >= 0 - ? pt_or_px_as_pixels(term, &conf->line_height) + term->cell_height = term->font_line_height.px >= 0 + ? pt_or_px_as_pixels(term, &term->font_line_height) : max(term->fonts[0]->height, term->fonts[0]->ascent + term->fonts[0]->descent); @@ -979,6 +979,7 @@ load_fonts_from_conf(struct terminal *term) } } + term->font_line_height = term->conf->line_height; return reload_fonts(term); } @@ -1196,6 +1197,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper, .pt_size = it->item.pt_size, .px_size = it->item.px_size}; } } + term->font_line_height = conf->line_height; /* Start the slave/client */ if ((term->slave = slave_spawn( @@ -1780,6 +1782,15 @@ term_font_size_adjust(struct terminal *term, double amount) } } + if (term->font_line_height.px >= 0) { + double old_pt_size = term->font_line_height.px > 0 + ? term->font_line_height.px * 72. / term->font_dpi + : term->font_line_height.pt; + + term->font_line_height.px = 0; + term->font_line_height.pt = fmax(old_pt_size + amount, 0); + } + return reload_fonts(term); } diff --git a/terminal.h b/terminal.h index 044fc581..6cf52522 100644 --- a/terminal.h +++ b/terminal.h @@ -261,6 +261,12 @@ struct url { }; typedef tll(struct url) url_list_t; +/* If px != 0 then px is valid, otherwise pt is valid */ +struct pt_or_px { + int16_t px; + float pt; +}; + struct terminal { struct fdm *fdm; struct reaper *reaper; @@ -312,6 +318,7 @@ struct terminal { struct fcft_font *fonts[4]; struct config_font *font_sizes[4]; + struct pt_or_px font_line_height; float font_dpi; int font_scale; int16_t font_x_ofs; -- cgit v1.3 From c5d57d23eaf1871b6a6ea74ba1385f39c64e26a9 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 23 Mar 2021 14:18:04 +0100 Subject: changelog: newlines incorrectly inserted into copied text --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e065995..ff203ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ bindings instead (https://codeberg.org/dnkl/foot/issues/407). * Custom `line-height` settings now scale when increasing or decreasing the font size at run-time. +* Newlines sometimes incorrectly inserted into copied text + (https://codeberg.org/dnkl/foot/issues/410). ### Security -- cgit v1.3 From 6ae8ed7e6be3614fd3b621d690d881a79ec789f1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 23 Mar 2021 14:06:10 +0100 Subject: changelog: don’t crash upon receiving text-input::enter without keyboard focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index ff203ed7..04b0fe7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,9 @@ decreasing the font size at run-time. * Newlines sometimes incorrectly inserted into copied text (https://codeberg.org/dnkl/foot/issues/410). +* Crash when compositor send `text-input-v3::enter` events without + first having sent a `keyboard::enter` event + (https://codeberg.org/dnkl/foot/issues/411). ### Security -- cgit v1.3 From 8111ff4be8335c73b93717ba6b948ee57395a740 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 24 Mar 2021 20:46:51 +0100 Subject: render: draw sixels before taking the render worker lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a possible deadlock; render_sixels_images() may call render_cell(), which may need to take the worker lock (when rendering either a blinking cell, or a box drawing glyph that isn’t yet in the glyph cache). --- CHANGELOG.md | 1 + render.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 04b0fe7f..7c7a6b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ * Crash when compositor send `text-input-v3::enter` events without first having sent a `keyboard::enter` event (https://codeberg.org/dnkl/foot/issues/411). +* Deadlock when rendering sixel images. ### Security diff --git a/render.c b/render.c index dd8070e0..d8e1a009 100644 --- a/render.c +++ b/render.c @@ -2090,6 +2090,8 @@ grid_render(struct terminal *term) cursor.row &= term->grid->num_rows - 1; } + render_sixel_images(term, buf->pix[0], &cursor); + if (term->render.workers.count > 0) { mtx_lock(&term->render.workers.lock); term->render.workers.buf = buf; @@ -2099,8 +2101,6 @@ grid_render(struct terminal *term) xassert(tll_length(term->render.workers.queue) == 0); } - render_sixel_images(term, buf->pix[0], &cursor); - int first_dirty_row = -1; for (int r = 0; r < term->rows; r++) { struct row *row = grid_row_in_view(term->grid, r); -- cgit v1.3 From a8de14c0bf3ddeaa65e098f20dfbdd4a41d76f5d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 25 Mar 2021 09:42:15 +0100 Subject: changelog: sub-surface sizes not a multiple of the scaling factor --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c7a6b1f..53f95872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,10 @@ first having sent a `keyboard::enter` event (https://codeberg.org/dnkl/foot/issues/411). * Deadlock when rendering sixel images. +* URL labels, scrollback search box or scrollback position indicator + sometimes not showing up, caused by invalidly sized surface buffers + when output scaling was enabled + (https://codeberg.org/dnkl/foot/issues/409). ### Security -- cgit v1.3 From 9786197d036e70ebe51c33a40f4bf2489f29e115 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 26 Mar 2021 21:00:41 +0100 Subject: changelog: updated PGO build instructions --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 53f95872..0b10e083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ ## Unreleased ### Added ### Changed + +* Update PGO build instructions in `INSTALL.md` + (https://codeberg.org/dnkl/foot/issues/418). + + ### Deprecated ### Removed ### Fixed -- cgit v1.3 From 0a24d0e40fe9e9a9bfb1dd1f4715f91af8a6168e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 27 Mar 2021 23:02:56 +0100 Subject: changelog: spaces matches empty cells in scrollback search mode --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b10e083..dec9f961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Update PGO build instructions in `INSTALL.md` (https://codeberg.org/dnkl/foot/issues/418). +* In scrollback search mode, empty cells can now be matched by spaces. ### Deprecated -- cgit v1.3 From efbbcf289f28f61b936b94a8daab84fd04158000 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 28 Mar 2021 13:04:15 +0200 Subject: changelog: empty sixels resulted in non-empty images --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b10e083..38d2a395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ sometimes not showing up, caused by invalidly sized surface buffers when output scaling was enabled (https://codeberg.org/dnkl/foot/issues/409). +* Empty sixels resulted in non-empty images. ### Security -- cgit v1.3