aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-21 22:28:41 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commitd84f3f4bd15e7d65fc0334cf7d62913c901bad00 (patch)
tree8d7a06956aab3d332423b59257a67adf4b92906f /x.c
parent8b564c1a3f51c08e64c2f589852a02b8595d44ca (diff)
downloadst-d84f3f4bd15e7d65fc0334cf7d62913c901bad00.tar.gz
st-d84f3f4bd15e7d65fc0334cf7d62913c901bad00.zip
Rely on ttyresize to set tty size
This removes ttynew's dependency on cresize being called first, and then allows us to absorb the ttyresize call into cresize (which always precedes it). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r--x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/x.c b/x.c
index e5b236d..7bfa1b7 100644
--- a/x.c
+++ b/x.c
@@ -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
700void 700void
@@ -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
1800void 1799void
@@ -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;