diff options
| author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-10 15:51:23 -0500 |
|---|---|---|
| committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
| commit | dbe8676d7d69651132bde2b6d9ec3787cbbc552a (patch) | |
| tree | 06b6397a18b266085f5b89677521dd441c860b4f /st.c | |
| parent | Move window-manipulating functions into x.c (diff) | |
| download | st-dbe8676d7d69651132bde2b6d9ec3787cbbc552a.tar.gz st-dbe8676d7d69651132bde2b6d9ec3787cbbc552a.zip | |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -905,14 +905,14 @@ ttysend(char *s, size_t n) | |||
| 905 | } | 905 | } |
| 906 | 906 | ||
| 907 | void | 907 | void |
| 908 | ttyresize(void) | 908 | ttyresize(int tw, int th) |
| 909 | { | 909 | { |
| 910 | struct winsize w; | 910 | struct winsize w; |
| 911 | 911 | ||
| 912 | w.ws_row = term.row; | 912 | w.ws_row = term.row; |
| 913 | w.ws_col = term.col; | 913 | w.ws_col = term.col; |
| 914 | w.ws_xpixel = win.tw; | 914 | w.ws_xpixel = tw; |
| 915 | w.ws_ypixel = win.th; | 915 | w.ws_ypixel = th; |
| 916 | if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) | 916 | if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) |
| 917 | fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); | 917 | fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); |
| 918 | } | 918 | } |
