From 1b8cb9ef91ba87c79d1bd65cee99f1f9b3ec1375 Mon Sep 17 00:00:00 2001 From: Utkarsh Verma Date: Thu, 2 Jun 2022 13:30:17 +0530 Subject: [PATCH] Improve render refresh and undef macro --- terminal.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/terminal.c b/terminal.c index 10a85841..04101fb4 100644 --- a/terminal.c +++ b/terminal.c @@ -2010,7 +2010,8 @@ bool term_alpha_increase(struct terminal *term) { term->colors.alpha = clamp(term->colors.alpha + ALPHA_STEP, 0, UINT16_MAX); - term->render.last_buf = NULL; + term_damage_view(term); + term_damage_margins(term); render_refresh(term); return true; } @@ -2019,7 +2020,8 @@ bool term_alpha_decrease(struct terminal *term) { term->colors.alpha = clamp(term->colors.alpha - ALPHA_STEP, 0, UINT16_MAX); - term->render.last_buf = NULL; + term_damage_view(term); + term_damage_margins(term); render_refresh(term); return true; } @@ -2028,10 +2030,12 @@ bool term_alpha_reset(struct terminal *term) { term->colors.alpha = term->conf->colors.alpha; - term->render.last_buf = NULL; + term_damage_view(term); + term_damage_margins(term); render_refresh(term); return true; } +#undef ALPHA_STEP bool term_font_dpi_changed(struct terminal *term, int old_scale)