mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
sixel: CSI setters also write a reply to the client
This commit is contained in:
parent
77fcb43ea5
commit
0c247de4ae
1 changed files with 9 additions and 5 deletions
14
sixel.c
14
sixel.c
|
|
@ -481,16 +481,19 @@ sixel_colors_report_current(struct terminal *term)
|
||||||
void
|
void
|
||||||
sixel_colors_reset(struct terminal *term)
|
sixel_colors_reset(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->sixel.palette_size = SIXEL_MAX_COLORS;
|
|
||||||
LOG_DBG("sixel palette size reset to %u", SIXEL_MAX_COLORS);
|
LOG_DBG("sixel palette size reset to %u", SIXEL_MAX_COLORS);
|
||||||
|
term->sixel.palette_size = SIXEL_MAX_COLORS;
|
||||||
|
sixel_colors_report_current(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sixel_colors_set(struct terminal *term, unsigned count)
|
sixel_colors_set(struct terminal *term, unsigned count)
|
||||||
{
|
{
|
||||||
unsigned new_palette_size = min(max(2, count), SIXEL_MAX_COLORS);
|
unsigned new_palette_size = min(max(2, count), SIXEL_MAX_COLORS);
|
||||||
term->sixel.palette_size = new_palette_size;
|
|
||||||
LOG_DBG("sixel palette size set to %u", new_palette_size);
|
LOG_DBG("sixel palette size set to %u", new_palette_size);
|
||||||
|
|
||||||
|
term->sixel.palette_size = new_palette_size;
|
||||||
|
sixel_colors_report_current(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -517,18 +520,19 @@ sixel_geometry_report_current(struct terminal *term)
|
||||||
void
|
void
|
||||||
sixel_geometry_reset(struct terminal *term)
|
sixel_geometry_reset(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
LOG_DBG("sixel geometry reset to %ux%u", max_width(term), max_height(term));
|
||||||
term->sixel.max_width = 0;
|
term->sixel.max_width = 0;
|
||||||
term->sixel.max_height = 0;
|
term->sixel.max_height = 0;
|
||||||
LOG_DBG("sixel geometry reset to %ux%u", max_width(term), max_height(term));
|
sixel_geometry_report_current(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sixel_geometry_set(struct terminal *term, unsigned width, unsigned height)
|
sixel_geometry_set(struct terminal *term, unsigned width, unsigned height)
|
||||||
{
|
{
|
||||||
|
LOG_DBG("sixel geometry set to %ux%u", width, height);
|
||||||
term->sixel.max_width = width;
|
term->sixel.max_width = width;
|
||||||
term->sixel.max_height = height;
|
term->sixel.max_height = height;
|
||||||
LOG_DBG("sixel geometry set to %ux%u",
|
sixel_geometry_report_current(term);
|
||||||
term->sixel.max_width, term->sixel.max_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue