mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-23 05:33:57 -04:00
render: resize() now only calls refresh() if asked to
This commit is contained in:
parent
709dbfe18b
commit
af26f043fb
2 changed files with 4 additions and 3 deletions
5
render.c
5
render.c
|
|
@ -960,7 +960,7 @@ reflow(struct row **new_grid, int new_cols, int new_rows,
|
||||||
|
|
||||||
/* Move to terminal.c? */
|
/* Move to terminal.c? */
|
||||||
void
|
void
|
||||||
render_resize(struct terminal *term, int width, int height)
|
render_resize(struct terminal *term, int width, int height, bool refresh)
|
||||||
{
|
{
|
||||||
int scale = -1;
|
int scale = -1;
|
||||||
tll_foreach(term->window->on_outputs, it) {
|
tll_foreach(term->window->on_outputs, it) {
|
||||||
|
|
@ -1083,7 +1083,8 @@ render_resize(struct terminal *term, int width, int height)
|
||||||
term->render.last_cursor.cell = NULL;
|
term->render.last_cursor.cell = NULL;
|
||||||
|
|
||||||
term_damage_view(term);
|
term_damage_view(term);
|
||||||
render_refresh(term);
|
if (refresh)
|
||||||
|
render_refresh(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
2
render.h
2
render.h
|
|
@ -6,7 +6,7 @@ struct font *attrs_to_font(
|
||||||
const struct terminal *term, const struct attributes *attrs);
|
const struct terminal *term, const struct attributes *attrs);
|
||||||
|
|
||||||
void grid_render(struct terminal *term);
|
void grid_render(struct terminal *term);
|
||||||
void render_resize(struct terminal *term, int width, int height);
|
void render_resize(struct terminal *term, int width, int height, bool refresh);
|
||||||
void render_set_title(struct terminal *term, const char *title);
|
void render_set_title(struct terminal *term, const char *title);
|
||||||
void render_refresh(struct terminal *term);
|
void render_refresh(struct terminal *term);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue