This commit is contained in:
okan 2017-04-24 13:31:19 +00:00
parent 9b56325908
commit 15a6fcc851

View File

@ -958,7 +958,7 @@ client_htile(struct client_ctx *cc)
struct group_ctx *gc = cc->gc; struct group_ctx *gc = cc->gc;
struct screen_ctx *sc = cc->sc; struct screen_ctx *sc = cc->sc;
struct geom area; struct geom area;
int i, n, mh, x, h, w; int i, n, mh, x, w, h;
if (!gc) if (!gc)
return; return;
@ -984,8 +984,8 @@ client_htile(struct client_ctx *cc)
cc->flags &= ~CLIENT_HMAXIMIZED; cc->flags &= ~CLIENT_HMAXIMIZED;
cc->geom.x = area.x; cc->geom.x = area.x;
cc->geom.y = area.y; cc->geom.y = area.y;
cc->geom.h = (area.h - (cc->bwidth * 2)) / 2;
cc->geom.w = area.w - (cc->bwidth * 2); cc->geom.w = area.w - (cc->bwidth * 2);
cc->geom.h = (area.h - (cc->bwidth * 2)) / 2;
client_resize(cc, 1); client_resize(cc, 1);
client_ptrwarp(cc); client_ptrwarp(cc);
@ -998,16 +998,16 @@ client_htile(struct client_ctx *cc)
ci->flags & CLIENT_IGNORE || (ci == cc)) ci->flags & CLIENT_IGNORE || (ci == cc))
continue; continue;
ci->bwidth = Conf.bwidth; ci->bwidth = Conf.bwidth;
ci->geom.y = area.y + mh;
ci->geom.x = x; ci->geom.x = x;
ci->geom.h = h - (ci->bwidth * 2); ci->geom.y = area.y + mh;
ci->geom.w = w - (ci->bwidth * 2); ci->geom.w = w - (ci->bwidth * 2);
ci->geom.h = h - (ci->bwidth * 2);
if (i + 1 == n) if (i + 1 == n)
ci->geom.w = area.x + area.w - ci->geom.w = area.x + area.w -
ci->geom.x - (ci->bwidth * 2); ci->geom.x - (ci->bwidth * 2);
x += w; x += w;
client_resize(ci, 1);
i++; i++;
client_resize(ci, 1);
} }
} }
@ -1018,7 +1018,7 @@ client_vtile(struct client_ctx *cc)
struct group_ctx *gc = cc->gc; struct group_ctx *gc = cc->gc;
struct screen_ctx *sc = cc->sc; struct screen_ctx *sc = cc->sc;
struct geom area; struct geom area;
int i, n, mw, y, h, w; int i, n, mw, y, w, h;
if (!gc) if (!gc)
return; return;
@ -1044,8 +1044,8 @@ client_vtile(struct client_ctx *cc)
cc->flags &= ~CLIENT_VMAXIMIZED; cc->flags &= ~CLIENT_VMAXIMIZED;
cc->geom.x = area.x; cc->geom.x = area.x;
cc->geom.y = area.y; cc->geom.y = area.y;
cc->geom.h = area.h - (cc->bwidth * 2);
cc->geom.w = (area.w - (cc->bwidth * 2)) / 2; cc->geom.w = (area.w - (cc->bwidth * 2)) / 2;
cc->geom.h = area.h - (cc->bwidth * 2);
client_resize(cc, 1); client_resize(cc, 1);
client_ptrwarp(cc); client_ptrwarp(cc);
@ -1058,16 +1058,16 @@ client_vtile(struct client_ctx *cc)
ci->flags & CLIENT_IGNORE || (ci == cc)) ci->flags & CLIENT_IGNORE || (ci == cc))
continue; continue;
ci->bwidth = Conf.bwidth; ci->bwidth = Conf.bwidth;
ci->geom.y = y;
ci->geom.x = area.x + mw; ci->geom.x = area.x + mw;
ci->geom.h = h - (ci->bwidth * 2); ci->geom.y = y;
ci->geom.w = w - (ci->bwidth * 2); ci->geom.w = w - (ci->bwidth * 2);
ci->geom.h = h - (ci->bwidth * 2);
if (i + 1 == n) if (i + 1 == n)
ci->geom.h = area.y + area.h - ci->geom.h = area.y + area.h -
ci->geom.y - (ci->bwidth * 2); ci->geom.y - (ci->bwidth * 2);
y += h; y += h;
client_resize(ci, 1);
i++; i++;
client_resize(ci, 1);
} }
} }