aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render.c3
-rw-r--r--wayland.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/render.c b/render.c
index 139bedb9..e54da4b5 100644
--- a/render.c
+++ b/render.c
@@ -962,6 +962,9 @@ reflow(struct row **new_grid, int new_cols, int new_rows,
void
render_resize(struct terminal *term, int width, int height, bool refresh)
{
+ if (width == 0 || height == 0)
+ return;
+
int scale = -1;
tll_foreach(term->window->on_outputs, it) {
if (it->item->scale > scale)
diff --git a/wayland.c b/wayland.c
index 9643cda2..415d8292 100644
--- a/wayland.c
+++ b/wayland.c
@@ -475,8 +475,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
else
term_visual_focus_out(term);
- if (width > 0 && height > 0)
- render_resize(term, width, height, false);
+ render_resize(term, width, height, false);
}
static void