From 2afc6782361d0deaa443234466775b1121feec8f Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 13 May 2021 11:10:51 +0200 Subject: term: get rid of term->font_scale, use term->scale only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only needed term->font_scale to be able to detect scaling factor changes (term->font_scale != term->scale). But, we already have the old scaling factor in all places where term_font_dpi_changed() is called, so let’s pass the old scaling factor as an argument instead. --- wayland.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wayland.c') diff --git a/wayland.c b/wayland.c index 24d22359..e1055101 100644 --- a/wayland.c +++ b/wayland.c @@ -285,8 +285,10 @@ update_term_for_output_change(struct terminal *term) if (tll_length(term->window->on_outputs) == 0) return; + int old_scale = term->scale; + render_resize(term, term->width / term->scale, term->height / term->scale); - term_font_dpi_changed(term); + term_font_dpi_changed(term, old_scale); term_font_subpixel_changed(term); } -- cgit v1.3