aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2017-10-10 15:51:23 -0500
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commitdbe8676d7d69651132bde2b6d9ec3787cbbc552a (patch)
tree06b6397a18b266085f5b89677521dd441c860b4f /st.c
parenta8314643b1aeaa2187dad71dc5748aaac1760c1b (diff)
downloadst-dbe8676d7d69651132bde2b6d9ec3787cbbc552a.tar.gz
st-dbe8676d7d69651132bde2b6d9ec3787cbbc552a.tar.bz2
Pass new dimensions into ttyresize
This removes another reference to TermWindow from st.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.c')
-rw-r--r--st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/st.c b/st.c
index 75c191d..839dc94 100644
--- a/st.c
+++ b/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));
}