testing Brians multiscreen issue fix
This commit is contained in:
parent
8262d9e663
commit
e5a1e77351
1 changed files with 9 additions and 9 deletions
18
dwm.c
18
dwm.c
|
@ -340,14 +340,14 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) {
|
||||||
*y = 0;
|
*y = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(*x > m->mx + m->mw)
|
if(*x >= m->wx + m->ww)
|
||||||
*x = m->mx + m->mw - WIDTH(c);
|
*x = m->wx + m->ww - WIDTH(c);
|
||||||
if(*y > m->my + m->mh)
|
if(*y >= m->wy + m->wh)
|
||||||
*y = m->my + m->mh - HEIGHT(c);
|
*y = m->wy + m->wh - HEIGHT(c);
|
||||||
if(*x + *w + 2 * c->bw < m->mx)
|
if(*x + *w + 2 * c->bw <= m->wx)
|
||||||
*x = m->mx;
|
*x = m->wx;
|
||||||
if(*y + *h + 2 * c->bw < m->my)
|
if(*y + *h + 2 * c->bw <= m->wy)
|
||||||
*y = m->my;
|
*y = m->wy;
|
||||||
}
|
}
|
||||||
if(*h < bh)
|
if(*h < bh)
|
||||||
*h = bh;
|
*h = bh;
|
||||||
|
@ -1146,7 +1146,7 @@ manage(Window w, XWindowAttributes *wa) {
|
||||||
c->y = c->mon->my + c->mon->mh - HEIGHT(c);
|
c->y = c->mon->my + c->mon->mh - HEIGHT(c);
|
||||||
c->x = MAX(c->x, c->mon->mx);
|
c->x = MAX(c->x, c->mon->mx);
|
||||||
/* only fix client y-offset, if the client center might cover the bar */
|
/* 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->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
|
||||||
c->bw = borderpx;
|
c->bw = borderpx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue