mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
render: render_resize(): don't do anything if width or height is 0
This commit is contained in:
parent
11892e8d23
commit
74aa604904
2 changed files with 4 additions and 2 deletions
3
render.c
3
render.c
|
|
@ -962,6 +962,9 @@ reflow(struct row **new_grid, int new_cols, int new_rows,
|
||||||
void
|
void
|
||||||
render_resize(struct terminal *term, int width, int height, bool refresh)
|
render_resize(struct terminal *term, int width, int height, bool refresh)
|
||||||
{
|
{
|
||||||
|
if (width == 0 || height == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
int scale = -1;
|
int scale = -1;
|
||||||
tll_foreach(term->window->on_outputs, it) {
|
tll_foreach(term->window->on_outputs, it) {
|
||||||
if (it->item->scale > scale)
|
if (it->item->scale > scale)
|
||||||
|
|
|
||||||
|
|
@ -475,8 +475,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
|
||||||
else
|
else
|
||||||
term_visual_focus_out(term);
|
term_visual_focus_out(term);
|
||||||
|
|
||||||
if (width > 0 && height > 0)
|
render_resize(term, width, height, false);
|
||||||
render_resize(term, width, height, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue