JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Remove unused parameters in ttyresize
[st.git] / st.c
diff --git a/st.c b/st.c
index f7fecf8..83edbb8 100644 (file)
--- a/st.c
+++ b/st.c
@@ -201,7 +201,7 @@ typedef struct {
        XftDraw *xft_draw;
        Visual *vis;
        int scr;
-       Bool isfixed; /* is fixed geometry? */
+       bool isfixed; /* is fixed geometry? */
        int fx, fy, fw, fh; /* fixed geometry */
        int tw, th; /* tty width and height */
        int w;  /* window width */
@@ -292,7 +292,7 @@ static void tfulldirt(void);
 
 static void ttynew(void);
 static void ttyread(void);
-static void ttyresize(int, int);
+static void ttyresize(void);
 static void ttywrite(const char *, size_t);
 
 static void xdraws(char *, Glyph, int, int, int, int);
@@ -899,7 +899,7 @@ ttywrite(const char *s, size_t n) {
 }
 
 void
-ttyresize(int x, int y) {
+ttyresize(void) {
        struct winsize w;
 
        w.ws_row = term.row;
@@ -940,7 +940,7 @@ tcursor(int mode) {
 
 void
 treset(void) {
-       unsigned i;
+       uint i;
        term.c = (TCursor){{
                .mode = ATTR_NULL,
                .fg = DefaultFG,
@@ -952,6 +952,7 @@ treset(void) {
                term.tabs[i] = 1;
        term.top = 0, term.bot = term.row - 1;
        term.mode = MODE_WRAP;
+       xclear(0, 0, xw.w, xw.h);
        tclearregion(0, 0, term.col-1, term.row-1);
 }
 
@@ -1603,7 +1604,7 @@ strreset(void) {
 
 void
 tputtab(bool forward) {
-       unsigned x = term.c.x;
+       uint x = term.c.x;
 
        if(forward) {
                if(x == term.col)
@@ -2326,7 +2327,7 @@ resize(XEvent *e) {
        xclear(0, 0, xw.w, xw.h);
        tresize(col, row);
        xresize(col, row);
-       ttyresize(col, row);
+       ttyresize();
 }
 
 void
@@ -2381,7 +2382,7 @@ run(void) {
 int
 main(int argc, char *argv[]) {
        int i, bitm, xr, yr;
-       unsigned int wr, hr;
+       uint wr, hr;
 
        xw.fw = xw.fh = xw.fx = xw.fy = 0;
        xw.isfixed = False;
@@ -2433,9 +2434,9 @@ main(int argc, char *argv[]) {
 
  run:
        setlocale(LC_CTYPE, "");
+       xinit();
        tnew(80, 24);
        ttynew();
-       xinit();
        selinit();
        run();
        return 0;