mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 07:44:24 +00:00
Some of SIXEL output path.
This commit is contained in:
20
tty.c
20
tty.c
@@ -155,13 +155,22 @@ tty_resize(struct tty *tty)
|
||||
tty_invalidate(tty);
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
tty_set_size(struct tty *tty, u_int sx, u_int sy, u_int xpixel, u_int ypixel)
|
||||
{
|
||||
if (tty->sx == sx &&
|
||||
tty->sy == sy &&
|
||||
tty->xpixel == xpixel &&
|
||||
tty->ypixel == ypixel)
|
||||
return (0);
|
||||
tty->sx = sx;
|
||||
tty->sy = sy;
|
||||
tty->xpixel = xpixel;
|
||||
tty->ypixel = ypixel;
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_tty_size_changed(tty);
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -523,6 +532,9 @@ tty_close(struct tty *tty)
|
||||
tty_stop_tty(tty);
|
||||
|
||||
if (tty->flags & TTY_OPENED) {
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_tty_free(tty);
|
||||
#endif
|
||||
evbuffer_free(tty->in);
|
||||
event_del(&tty->event_in);
|
||||
evbuffer_free(tty->out);
|
||||
@@ -539,6 +551,9 @@ void
|
||||
tty_free(struct tty *tty)
|
||||
{
|
||||
tty_close(tty);
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_tty_free(tty);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -548,6 +563,9 @@ tty_update_features(struct tty *tty)
|
||||
|
||||
if (tty_apply_features(tty->term))
|
||||
tty_term_apply_overrides(tty->term);
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_tty_update(tty);
|
||||
#endif
|
||||
|
||||
if (tty_use_margin(tty))
|
||||
tty_putcode(tty, TTYC_ENMG);
|
||||
|
||||
Reference in New Issue
Block a user