diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-26 16:50:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-26 16:50:41 +0000 |
| commit | 269e04fa1b9aa864c95dbcf74baedb588269bc78 (patch) | |
| tree | acc89b876d771e46248ad18d462f0c30f835a6a1 /render.c | |
| parent | input: generate escape sequences for "other" keys (diff) | |
render: flush glyph sequence after erase previous cursor
If not, we may have scrolled when we later flush the glyph sequence,
causing the glyph to be rendered in wrong location.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -56,6 +56,9 @@ color_dim(struct rgb *rgb) static void gseq_flush(struct terminal *term, struct buffer *buf) { + if (gseq.count == 0) + return; + struct rgb fg = color_hex_to_rgb(gseq.foreground); if (gseq.attrs.dim) @@ -392,6 +395,9 @@ grid_render(struct terminal *term) term->render.last_cursor.in_view.col, term->render.last_cursor.in_view.row, false); + /* Must flush now since scroll damage will shift the entire pixmap */ + gseq_flush(term, buf); + wl_surface_damage_buffer( term->wl.surface, term->render.last_cursor.in_view.col * term->cell_width, @@ -540,15 +546,13 @@ grid_render(struct terminal *term) term->cell_width, term->cell_height); } + gseq_flush(term, buf); + if (all_clean) { buf->busy = false; - gseq_flush(term, buf); return; } - if (gseq.count > 0) - gseq_flush(term, buf); - if (term->flash.active) { cairo_set_source_rgba(buf->cairo, 1.0, 1.0, 0.0, 0.5); cairo_set_operator(buf->cairo, CAIRO_OPERATOR_OVER); |
