aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-13 17:44:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-13 17:47:16 +0000
commitd482bf0a304b8224499bf9de9e0781518106ec7c (patch)
treeafc68b49ecaa21a3f1d5a089cfa5a7b18a95d654 /render.c
parentinput: maximize: unset fullscreen before toggling maximized state (diff)
sixel: improve handling of images when reflowing the grids
Update the sixels' 'row' attribute when re-flowing a grid, to ensure it is rendered at the correct place. This should work in most cases, but will break when the cell size has changed (e.g. font size increase/decrease, or a DPI change). This patch also moves the sixel image list from the terminal struct into the grid struct. The sixels are per-grid after all.
Diffstat (limited to 'render.c')
-rw-r--r--render.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/render.c b/render.c
index fdb156ea..2c00a513 100644
--- a/render.c
+++ b/render.c
@@ -531,9 +531,6 @@ static void
render_sixel(struct terminal *term, pixman_image_t *pix,
const struct sixel *sixel)
{
- if (sixel->grid != term->grid)
- return;
-
int view_end = (term->grid->view + term->rows - 1) & (term->grid->num_rows - 1);
int first_visible_row = -1;
@@ -599,7 +596,7 @@ render_sixel(struct terminal *term, pixman_image_t *pix,
static void
render_sixel_images(struct terminal *term, pixman_image_t *pix)
{
- tll_foreach(term->sixel_images, it)
+ tll_foreach(term->grid->sixel_images, it)
render_sixel(term, pix, &it->item);
}