Fix SIXEL build.

This commit is contained in:
Nicholas Marriott
2026-06-23 09:05:44 +01:00
parent 7654b518f1
commit 51b787e449
4 changed files with 14 additions and 1907 deletions

1897
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -1139,10 +1139,6 @@ redraw_draw_border_arrow(struct redraw_draw_ctx *dctx,
else
return;
#ifdef ENABLE_SIXEL
tty_draw_images(c, wp, s);
#endif
utf8_set(&gc->data, ch);
gc->attr |= GRID_ATTR_CHARSET;
}
@@ -1622,8 +1618,16 @@ redraw_draw(struct client *c, struct window_pane *wp, int flags)
tty_reset(tty);
tty_sync_end(tty);
log_debug("%s: finished @%u redraw", c->name, scene->w->id);
#ifdef ENABLE_SIXEL
if (wp != NULL)
tty_draw_images(c, wp);
else {
TAILQ_FOREACH(loop, &scene->w->panes, entry)
tty_draw_images(c, wp);
}
#endif
log_debug("%s: finished @%u redraw", c->name, scene->w->id);
}
/* Get border cell type beneath status cell at offset x in pane status line. */

2
tmux.h
View File

@@ -2753,7 +2753,7 @@ void tty_cmd_setselection(struct tty *, const struct tty_ctx *);
void tty_cmd_rawstring(struct tty *, const struct tty_ctx *);
#ifdef ENABLE_SIXEL
void tty_cmd_sixelimage(struct tty *, const struct tty_ctx *);
void tty_draw_images(struct client *, struct window_pane *, struct screen *);
void tty_draw_images(struct client *, struct window_pane *);
#endif
void tty_cmd_syncstart(struct tty *, const struct tty_ctx *);
void tty_default_colours(struct grid_cell *, struct window_pane *, u_int *);

8
tty.c
View File

@@ -1545,20 +1545,20 @@ tty_set_client_cb(struct tty_ctx *ttyctx, struct client *c)
}
void
tty_draw_images(struct client *c, struct window_pane *wp, struct screen *s)
tty_draw_images(struct client *c, struct window_pane *wp)
{
struct image *im;
struct tty_ctx ttyctx;
TAILQ_FOREACH(im, &s->images, entry) {
TAILQ_FOREACH(im, &wp->screen->images, entry) {
memset(&ttyctx, 0, sizeof ttyctx);
/* Set the client independent properties. */
ttyctx.ocx = im->px;
ttyctx.ocy = im->py;
ttyctx.orlower = s->rlower;
ttyctx.orupper = s->rupper;
ttyctx.orlower = wp->screen->rlower;
ttyctx.orupper = wp->screen->rupper;
ttyctx.xoff = ttyctx.rxoff = wp->xoff;
ttyctx.sx = wp->sx;