Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Pass new dimensions into ttyresize
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
75c191d
..
839dc94
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-905,14
+905,14
@@
ttysend(char *s, size_t n)
}
void
}
void
-ttyresize(
void
)
+ttyresize(
int tw, int th
)
{
struct winsize w;
w.ws_row = term.row;
w.ws_col = term.col;
{
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));
}
if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0)
fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno));
}