aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authoranselm@garbe.us <unknown>2011-11-04 20:02:35 +0100
committeranselm@garbe.us <unknown>2011-11-04 20:02:35 +0100
commite5a1e77351bb4538a1a475739a00dcb41aa35701 (patch)
tree41389e92695fb7593aa8a2cbcc5a26ac67705a7b /dwm.c
parent8262d9e663a98ab74b938bb5cdf0ddfd733bc5df (diff)
downloaddwm-e5a1e77351bb4538a1a475739a00dcb41aa35701.tar.gz
dwm-e5a1e77351bb4538a1a475739a00dcb41aa35701.tar.bz2
dwm-e5a1e77351bb4538a1a475739a00dcb41aa35701.zip
testing Brians multiscreen issue fix
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/dwm.c b/dwm.c
index f753bfe..58a5746 100644
--- a/dwm.c
+++ b/dwm.c
@@ -340,14 +340,14 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) {
*y = 0;
}
else {
- if(*x > m->mx + m->mw)
- *x = m->mx + m->mw - WIDTH(c);
- if(*y > m->my + m->mh)
- *y = m->my + m->mh - HEIGHT(c);
- if(*x + *w + 2 * c->bw < m->mx)
- *x = m->mx;
- if(*y + *h + 2 * c->bw < m->my)
- *y = m->my;
+ if(*x >= m->wx + m->ww)
+ *x = m->wx + m->ww - WIDTH(c);
+ if(*y >= m->wy + m->wh)
+ *y = m->wy + m->wh - HEIGHT(c);
+ if(*x + *w + 2 * c->bw <= m->wx)
+ *x = m->wx;
+ if(*y + *h + 2 * c->bw <= m->wy)
+ *y = m->wy;
}
if(*h < bh)
*h = bh;
@@ -1146,7 +1146,7 @@ manage(Window w, XWindowAttributes *wa) {
c->y = c->mon->my + c->mon->mh - HEIGHT(c);
c->x = MAX(c->x, c->mon->mx);
/* only fix client y-offset, if the client center might cover the bar */
- c->y = MAX(c->y, ((c->mon->by == 0) && (c->x + (c->w / 2) >= c->mon->wx)
+ c->y = MAX(c->y, ((c->mon->by == c->mon->my) && (c->x + (c->w / 2) >= c->mon->wx)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
c->bw = borderpx;
}