Pass new dimensions into ttyresize

This removes another reference to TermWindow from st.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
This commit is contained in:
Devin J. Pohly
2017-10-10 15:51:23 -05:00
parent a8314643b1
commit dbe8676d7d
3 changed files with 7 additions and 7 deletions

6
st.c

@ -905,14 +905,14 @@ ttysend(char *s, size_t n)
}
void
ttyresize(void)
ttyresize(int tw, int th)
{
struct winsize w;
w.ws_row = term.row;
w.ws_col = term.col;
w.ws_xpixel = win.tw;
w.ws_ypixel = win.th;
w.ws_xpixel = tw;
w.ws_ypixel = th;
if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0)
fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno));
}