mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-07 08:21:02 -04:00
render: render non-block cursors after rendering the glyph + decorations
This fixes an issue where an 'underline' cursor wasn't visible on underlined text - the cursor was rendered first, and then shadowed by the text underline.
This commit is contained in:
parent
233a909160
commit
93207bc482
2 changed files with 9 additions and 4 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
* Sixel images moved or deleted on window resize.
|
* Sixel images moved or deleted on window resize.
|
||||||
* Cursor sometimes incorrectly restored on exit from alternate screen.
|
* Cursor sometimes incorrectly restored on exit from alternate screen.
|
||||||
|
* 'Underline' cursor being invisible on underlined text.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
12
render.c
12
render.c
|
|
@ -432,14 +432,14 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
PIXMAN_OP_SRC, pix, &bg, 1,
|
PIXMAN_OP_SRC, pix, &bg, 1,
|
||||||
&(pixman_rectangle16_t){x, y, cell_cols * width, height});
|
&(pixman_rectangle16_t){x, y, cell_cols * width, height});
|
||||||
|
|
||||||
if (has_cursor)
|
|
||||||
draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols);
|
|
||||||
|
|
||||||
if (cell->attrs.blink)
|
if (cell->attrs.blink)
|
||||||
term_arm_blink_timer(term);
|
term_arm_blink_timer(term);
|
||||||
|
|
||||||
|
if (has_cursor && term->cursor_style == CURSOR_BLOCK)
|
||||||
|
draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols);
|
||||||
|
|
||||||
if (cell->wc == 0 || cell->attrs.conceal)
|
if (cell->wc == 0 || cell->attrs.conceal)
|
||||||
return cell_cols;
|
goto draw_cursor;
|
||||||
|
|
||||||
if (glyph != NULL) {
|
if (glyph != NULL) {
|
||||||
if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) {
|
if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) {
|
||||||
|
|
@ -472,6 +472,10 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
&fg, x, y, cell_cols);
|
&fg, x, y, cell_cols);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_cursor:
|
||||||
|
if (has_cursor && term->cursor_style != CURSOR_BLOCK)
|
||||||
|
draw_cursor(term, cell, font, pix, &fg, &bg, x, y, cell_cols);
|
||||||
|
|
||||||
return cell_cols;
|
return cell_cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue