diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-12 19:32:38 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-12 19:33:24 +0000 |
| commit | 05e91fa9df2fb0b34eea1a82a521b5544580f3f8 (patch) | |
| tree | 6c2ae681c82045cf4ee256c38744b612702f9acc /render.c | |
| parent | output: initial support for output scaling (diff) | |
output: resize on scale changes
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; |
