render: revert part of a36f67cbe3

render_osd() shouldn't use term_font_baseline().

This is because term_font_baseline() uses the line height to determine
the position, while render_osd() renders to surfaces that aren't sized
like the grid.

This fixes a regression, where the CSD title were sometimes rendered
too high up, and sometimes too low.
This commit is contained in:
Daniel Eklöf 2023-07-28 15:37:48 +02:00
parent fd813d0e6c
commit e912656682
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1926,12 +1926,12 @@ render_osd(struct terminal *term, const struct wayl_sub_surface *sub_surf,
if (pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8) {
pixman_image_composite32(
PIXMAN_OP_OVER, glyph->pix, NULL, buf->pix[0], 0, 0, 0, 0,
x + x_ofs + glyph->x, y + /*term->font_y_ofs + font->ascent*/ term_font_baseline(term) - glyph->y,
x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent /*term_font_baseline(term)*/ - glyph->y,
glyph->width, glyph->height);
} else {
pixman_image_composite32(
PIXMAN_OP_OVER, src, glyph->pix, buf->pix[0], 0, 0, 0, 0,
x + x_ofs + glyph->x, y + /*term->font_y_ofs + font->ascent*/ term_font_baseline(term) - glyph->y,
x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent /* term_font_baseline(term)*/ - glyph->y,
glyph->width, glyph->height);
}