mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-09 10:06:20 -05:00
main: no need to damage the _entire_ view on blink timer
This commit is contained in:
parent
e21ab8cf33
commit
c1381fbb54
1 changed files with 11 additions and 1 deletions
12
main.c
12
main.c
|
|
@ -812,7 +812,17 @@ main(int argc, char *const *argv)
|
|||
|
||||
term.blink_mode = term.blink_mode == BLINK_ON
|
||||
? BLINK_OFF : BLINK_ON;
|
||||
term_damage_view(&term);
|
||||
|
||||
/* Scan all visible cells and mark rows with blinking cells dirty */
|
||||
for (int r = 0; r < term.rows; r++) {
|
||||
struct row *row = grid_row_in_view(term.grid, r);
|
||||
for (int col = 0; col < term.cols; col++) {
|
||||
if (row->cells[col].attrs.blink) {
|
||||
row->dirty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (term.frame_callback == NULL)
|
||||
grid_render(&term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue