diff options
-rw-r--r-- | st.c | 3 | ||||
-rw-r--r-- | x.c | 6 |
2 files changed, 3 insertions, 6 deletions
@@ -670,7 +670,6 @@ void | |||
670 | ttynew(char *line, char *out, char **args) | 670 | ttynew(char *line, char *out, char **args) |
671 | { | 671 | { |
672 | int m, s; | 672 | int m, s; |
673 | struct winsize w = {term.row, term.col, 0, 0}; | ||
674 | 673 | ||
675 | if (out) { | 674 | if (out) { |
676 | term.mode |= MODE_PRINT; | 675 | term.mode |= MODE_PRINT; |
@@ -691,7 +690,7 @@ ttynew(char *line, char *out, char **args) | |||
691 | } | 690 | } |
692 | 691 | ||
693 | /* seems to work fine on linux, openbsd and freebsd */ | 692 | /* seems to work fine on linux, openbsd and freebsd */ |
694 | if (openpty(&m, &s, NULL, NULL, &w) < 0) | 693 | if (openpty(&m, &s, NULL, NULL, NULL) < 0) |
695 | die("openpty failed: %s\n", strerror(errno)); | 694 | die("openpty failed: %s\n", strerror(errno)); |
696 | 695 | ||
697 | switch (pid = fork()) { | 696 | switch (pid = fork()) { |
@@ -276,7 +276,6 @@ zoomabs(const Arg *arg) | |||
276 | xunloadfonts(); | 276 | xunloadfonts(); |
277 | xloadfonts(usedfont, arg->f); | 277 | xloadfonts(usedfont, arg->f); |
278 | cresize(0, 0); | 278 | cresize(0, 0); |
279 | ttyresize(win.tw, win.th); | ||
280 | redraw(); | 279 | redraw(); |
281 | xhints(); | 280 | xhints(); |
282 | } | 281 | } |
@@ -695,6 +694,7 @@ cresize(int width, int height) | |||
695 | 694 | ||
696 | tresize(col, row); | 695 | tresize(col, row); |
697 | xresize(col, row); | 696 | xresize(col, row); |
697 | ttyresize(win.tw, win.th); | ||
698 | } | 698 | } |
699 | 699 | ||
700 | void | 700 | void |
@@ -1794,7 +1794,6 @@ resize(XEvent *e) | |||
1794 | return; | 1794 | return; |
1795 | 1795 | ||
1796 | cresize(e->xconfigure.width, e->xconfigure.height); | 1796 | cresize(e->xconfigure.width, e->xconfigure.height); |
1797 | ttyresize(win.tw, win.th); | ||
1798 | } | 1797 | } |
1799 | 1798 | ||
1800 | void | 1799 | void |
@@ -1823,9 +1822,8 @@ run(void) | |||
1823 | } | 1822 | } |
1824 | } while (ev.type != MapNotify); | 1823 | } while (ev.type != MapNotify); |
1825 | 1824 | ||
1826 | cresize(w, h); | ||
1827 | ttynew(opt_line, opt_io, opt_cmd); | 1825 | ttynew(opt_line, opt_io, opt_cmd); |
1828 | ttyresize(win.tw, win.th); | 1826 | cresize(w, h); |
1829 | 1827 | ||
1830 | clock_gettime(CLOCK_MONOTONIC, &last); | 1828 | clock_gettime(CLOCK_MONOTONIC, &last); |
1831 | lastblink = last; | 1829 | lastblink = last; |