JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Added tag 3.5 for changeset 63ad05e7f9e1
[dwm.git] / view.c
diff --git a/view.c b/view.c
index de3328e..8164446 100644 (file)
--- a/view.c
+++ b/view.c
@@ -55,9 +55,8 @@ dofloat(void) {
        Client *c;
 
        for(c = clients; c; c = c->next) {
-               if(isvisible(c)) {
+               if(isvisible(c))
                        resize(c, True);
-               }
                else
                        XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
        }
@@ -98,11 +97,11 @@ dotile(void) {
                        else {  /* tile window */
                                c->x += mw;
                                c->w = tw - 2 * BORDERPX;
-                               if(th - 2 * BORDERPX > bh) {
+                               if(th > 2 * BORDERPX) {
                                        c->y += (i - nmaster) * th;
                                        c->h = th - 2 * BORDERPX;
                                }
-                               else /* fallback if th - 2 * BORDERPX < bh */
+                               else /* fallback if th <= 2 * BORDERPX */
                                        c->h = wah - 2 * BORDERPX;
                        }
                        resize(c, False);
@@ -150,7 +149,7 @@ focusprev(Arg *arg) {
 void
 incnmaster(Arg *arg) {
        if((arrange == dofloat) || (nmaster + arg->i < 1)
-               || (wah / (nmaster + arg->i) - 2 * BORDERPX < bh))
+       || (wah / (nmaster + arg->i) <= 2 * BORDERPX))
                return;
        nmaster += arg->i;
        if(sel)
@@ -174,8 +173,8 @@ resizemaster(Arg *arg) {
        if(arg->i == 0)
                master = MASTER;
        else {
-               if(waw * (master + arg->i) / 1000 > waw - bh - 2 * BORDERPX
-                       || waw * (master + arg->i) / 1000 < bh + 2 * BORDERPX)
+               if(waw * (master + arg->i) / 1000 >= waw - 2 * BORDERPX
+               || waw * (master + arg->i) / 1000 <= 2 * BORDERPX)
                        return;
                master += arg->i;
        }
@@ -207,7 +206,7 @@ restack(void) {
 
 void
 togglefloat(Arg *arg) {
-       if (!sel || arrange == dofloat)
+       if(!sel || arrange == dofloat)
                return;
        sel->isfloat = !sel->isfloat;
        arrange();