fixed small offset issue
[dwm.git] / view.c
diff --git a/view.c b/view.c
index ac8e7a3..72e32c7 100644 (file)
--- a/view.c
+++ b/view.c
@@ -194,7 +194,7 @@ dotile(Arg *arg) {
                                        break;
                                case StackBottom:
                                        c->x = sx;
-                                       c->y = sy + master;
+                                       c->y = sy + master + bh;
                                        break;
                                case StackRight:
                                        c->x = sx + master;
@@ -294,11 +294,18 @@ restack(void) {
                XRaiseWindow(dpy, sel->win);
                XRaiseWindow(dpy, sel->twin);
        }
-       if(arrange != dofloat)
+       if(arrange != dofloat) {
+               if(!sel->isfloat) {
+                       XLowerWindow(dpy, sel->twin);
+                       XLowerWindow(dpy, sel->win);
+               }
                for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
+                       if(c == sel)
+                               continue;
                        XLowerWindow(dpy, c->twin);
                        XLowerWindow(dpy, c->win);
                }
+       }
        drawall();
        XSync(dpy, False);
        while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));