render margins more often when bleeding

This commit is contained in:
Michael Peters 2026-03-21 09:56:20 -07:00
parent e6f8622723
commit 949cc0e833
2 changed files with 6 additions and 8 deletions

View file

@ -2826,11 +2826,8 @@ parse_section_tweak(struct context *ctx)
else if (streq(key, "overflowing-glyphs"))
return value_to_bool(ctx, &conf->tweak.overflowing_glyphs);
else if (streq(key, "edge-bg-bleed")) {
bool ret = value_to_bool(ctx, &conf->tweak.edge_bg_bleed);
LOG_WARN("edge-bg-bleed: %s", conf->tweak.edge_bg_bleed ? "yes" : "no");
return ret;
}
else if (streq(key, "edge-bg-bleed"))
return value_to_bool(ctx, &conf->tweak.edge_bg_bleed);
else if (streq(key, "damage-whole-window"))
return value_to_bool(ctx, &conf->tweak.damage_whole_window);

View file

@ -1376,9 +1376,6 @@ static void
render_margin_bleed(struct terminal *term, struct buffer *buf,
int start_line, int end_line, bool apply_damage)
{
LOG_WARN("render_margin_bleed: start_line=%d, end_line=%d, apply_damage=%d",
start_line, end_line, apply_damage);
const bool gamma_correct = wayl_do_linear_blending(term->wl, term->conf);
struct grid *grid = term->grid;
const int width = term->cell_width;
@ -3804,6 +3801,10 @@ grid_render(struct terminal *term)
pixman_region32_union(&buf->dirty[0], &buf->dirty[0], &damage);
/* Re-render margins with edge cell backgrounds after row rendering */
if (term->conf->tweak.edge_bg_bleed)
render_margin_bleed(term, buf, 0, term->rows, true);
{
int box_count = 0;
pixman_box32_t *boxes = pixman_region32_rectangles(&damage, &box_count);