From d07fd7de39d588f79da307a9d112e445af86869a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 3 Jan 2020 13:56:10 +0100 Subject: render: remove 'refresh' from render_resize() --- render.c | 5 ++--- render.h | 2 +- terminal.c | 2 +- wayland.c | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/render.c b/render.c index e54da4b5..5e7ef233 100644 --- a/render.c +++ b/render.c @@ -960,7 +960,7 @@ 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, bool refresh) +render_resize(struct terminal *term, int width, int height) { if (width == 0 || height == 0) return; @@ -1086,8 +1086,7 @@ render_resize(struct terminal *term, int width, int height, bool refresh) term->render.last_cursor.cell = NULL; term_damage_view(term); - if (refresh) - render_refresh(term); + render_refresh(term); } void diff --git a/render.h b/render.h index e3253074..ad6b6578 100644 --- a/render.h +++ b/render.h @@ -6,7 +6,7 @@ struct font *attrs_to_font( const struct terminal *term, const struct attributes *attrs); void grid_render(struct terminal *term); -void render_resize(struct terminal *term, int width, int height, bool refresh); +void render_resize(struct terminal *term, int width, int height); void render_set_title(struct terminal *term, const char *title); void render_refresh(struct terminal *term); diff --git a/terminal.c b/terminal.c index d1853c18..88a4374a 100644 --- a/terminal.c +++ b/terminal.c @@ -679,7 +679,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl, /* Don't go below a single cell */ width = max(width, term->cell_width); height = max(height, term->cell_height); - render_resize(term, width, height, true); + render_resize(term, width, height); return term; diff --git a/wayland.c b/wayland.c index 033670df..4b419684 100644 --- a/wayland.c +++ b/wayland.c @@ -144,7 +144,7 @@ output_scale(void *data, struct wl_output *wl_output, int32_t factor) struct terminal *term = it->item; int scale = term->scale; - render_resize(term, term->width / scale, term->height / scale, true); + render_resize(term, term->width / scale, term->height / scale); wayl_reload_cursor_theme(mon->wayl, term); } } @@ -371,7 +371,7 @@ surface_enter(void *data, struct wl_surface *wl_surface, /* Resize, since scale-to-use may have changed */ int scale = term->scale; - render_resize(term, term->width / scale, term->height / scale, true); + render_resize(term, term->width / scale, term->height / scale); wayl_reload_cursor_theme(term->wl, term); return; } @@ -396,7 +396,7 @@ surface_leave(void *data, struct wl_surface *wl_surface, /* Resize, since scale-to-use may have changed */ int scale = term->scale; - render_resize(term, term->width / scale, term->height / scale, true); + render_resize(term, term->width / scale, term->height / scale); wayl_reload_cursor_theme(term->wl, term); return; } @@ -510,7 +510,7 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface, else term_visual_focus_out(term); - render_resize(term, win->configure.width, win->configure.height, true); + render_resize(term, win->configure.width, win->configure.height); } static const struct xdg_surface_listener xdg_surface_listener = { -- cgit v1.3