mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: follow cursor.unfocused-style regardless of cursor.style
Before this commit, cursor.unfocused-style was effective only with cursor.style=block
This commit is contained in:
parent
96c30cd410
commit
a2fc2a986e
2 changed files with 19 additions and 14 deletions
|
|
@ -57,6 +57,11 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* `cursor.unfocused-style` is now effective even when `cursor.style`
|
||||||
|
is not `block`.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
28
render.c
28
render.c
|
|
@ -591,22 +591,22 @@ draw_cursor(const struct terminal *term, const struct cell *cell,
|
||||||
pixman_color_t text_color;
|
pixman_color_t text_color;
|
||||||
cursor_colors_for_cell(term, cell, fg, bg, &cursor_color, &text_color);
|
cursor_colors_for_cell(term, cell, fg, bg, &cursor_color, &text_color);
|
||||||
|
|
||||||
|
if (unlikely(!term->kbd_focus)) {
|
||||||
|
switch (term->conf->cursor.unfocused_style) {
|
||||||
|
case CURSOR_UNFOCUSED_UNCHANGED:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CURSOR_UNFOCUSED_HOLLOW:
|
||||||
|
draw_hollow_block(term, pix, &cursor_color, x, y, cols);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case CURSOR_UNFOCUSED_NONE:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (term->cursor_style) {
|
switch (term->cursor_style) {
|
||||||
case CURSOR_BLOCK:
|
case CURSOR_BLOCK:
|
||||||
if (unlikely(!term->kbd_focus)) {
|
|
||||||
switch (term->conf->cursor.unfocused_style) {
|
|
||||||
case CURSOR_UNFOCUSED_UNCHANGED:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CURSOR_UNFOCUSED_HOLLOW:
|
|
||||||
draw_hollow_block(term, pix, &cursor_color, x, y, cols);
|
|
||||||
return;
|
|
||||||
|
|
||||||
case CURSOR_UNFOCUSED_NONE:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (likely(term->cursor_blink.state == CURSOR_BLINK_ON) ||
|
if (likely(term->cursor_blink.state == CURSOR_BLINK_ON) ||
|
||||||
!term->kbd_focus)
|
!term->kbd_focus)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue