mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-20 01:40:14 -05:00
output: resize on scale changes
This commit is contained in:
parent
74f723e0cf
commit
05e91fa9df
4 changed files with 16 additions and 6 deletions
10
render.c
10
render.c
|
|
@ -675,16 +675,22 @@ reflow(struct row **new_grid, int new_cols, int new_rows,
|
|||
|
||||
/* Move to terminal.c? */
|
||||
void
|
||||
render_resize(struct terminal *term, int width, int height)
|
||||
render_resize(struct terminal *term, int width, int height, int scale)
|
||||
{
|
||||
width *= term->scale;
|
||||
height *= term->scale;
|
||||
|
||||
if (width == term->width && height == term->height)
|
||||
if (width == 0 && height == 0) {
|
||||
/* Assume we're not fully up and running yet */
|
||||
return;
|
||||
}
|
||||
|
||||
if (width == term->width && height == term->height && scale == term->scale)
|
||||
return;
|
||||
|
||||
term->width = width;
|
||||
term->height = height;
|
||||
term->scale = scale;
|
||||
|
||||
const int scrollback_lines = term->render.scrollback_lines;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue