diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-07-28 13:37:48 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-28 13:37:48 +0000 |
| commit | e912656682cd6645241fd5ba9ce3c1d1533c03b4 (patch) | |
| tree | 3dcd88d74776586715293a67c67dac33a7eba828 /render.c | |
| parent | font baseline: use max(font->height, font->ascent + font->descent) when calculating font height (diff) | |
render: revert part of a36f67cbe311bebd9321fbf58773dace8128fcd7
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.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |
