JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
be more polite to clients which like to appear outside the window area, but still...
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index 4a8c2a9..37df864 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -958,12 +958,12 @@ manage(Window w, XWindowAttributes *wa) {
                c->bw = wa->border_width;
        }
        else {
-               if(c->x + c->w + 2 * c->bw > wx + ww)
-                       c->x = wx + ww - c->w - 2 * c->bw;
-               if(c->y + c->h + 2 * c->bw > wy + wh)
-                       c->y = wy + wh - c->h - 2 * c->bw;
-               c->x = MAX(c->x, wx);
-               c->y = MAX(c->y, wy);
+               if(c->x + c->w + 2 * c->bw > sx + sw)
+                       c->x = sx + sw - c->w - 2 * c->bw;
+               if(c->y + c->h + 2 * c->bw > sy + sh)
+                       c->y = sy + sh - c->h - 2 * c->bw;
+               c->x = MAX(c->x, sx);
+               c->y = MAX(c->y, sy);
                c->bw = borderpx;
        }
 
@@ -1590,7 +1590,7 @@ updategeom(void) {
        if(XineramaIsActive(dpy)) {
                info = XineramaQueryScreens(dpy, &i);
                wx = info[0].x_org;
-               wy = showbar && topbar ? info[0].y_org + info[0].height + bh : info[0].y_org;
+               wy = showbar && topbar ? info[0].y_org + bh : info[0].y_org;
                ww = info[0].width;
                wh = showbar ? info[0].height - bh : info[0].height;
                XFree(info);