yet another simplification of dotile()
This commit is contained in:
parent
0ef6e3103c
commit
2583a7c0d1
17
view.c
17
view.c
|
@ -133,17 +133,15 @@ dotile(Arg *arg) {
|
|||
continue;
|
||||
}
|
||||
c->ismax = False;
|
||||
if(n == 1) { /* only 1 window */
|
||||
c->x = sx;
|
||||
c->y = sy + bh;
|
||||
if(n == 1) { /* only 1 window */
|
||||
c->w = sw - 2 * BORDERPX;
|
||||
c->h = sh - 2 * BORDERPX - bh;
|
||||
}
|
||||
else if(i == 0) { /* master window */
|
||||
c->x = sx;
|
||||
if(stackpos == StackLeft)
|
||||
c->x += stackw;
|
||||
c->y = sy + bh;
|
||||
switch(stackpos) {
|
||||
case StackLeft:
|
||||
case StackRight:
|
||||
|
@ -156,12 +154,10 @@ dotile(Arg *arg) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if(th > bh) { /* tile window */
|
||||
c->x = sx;
|
||||
else { /* tile window */
|
||||
if(stackpos == StackRight)
|
||||
c->x += master;
|
||||
c->w = tw - 2 * BORDERPX;
|
||||
c->h = th - 2 * BORDERPX;
|
||||
if(th > bh) {
|
||||
switch(stackpos) {
|
||||
case StackLeft:
|
||||
case StackRight:
|
||||
|
@ -175,17 +171,16 @@ dotile(Arg *arg) {
|
|||
c->h = sh - c->y - 2 * BORDERPX;
|
||||
break;
|
||||
}
|
||||
c->w = tw - 2 * BORDERPX;
|
||||
c->h = th - 2 * BORDERPX;
|
||||
}
|
||||
else { /* fallback if th < bh */
|
||||
c->x = sx;
|
||||
if(stackpos == StackRight)
|
||||
c->x += master;
|
||||
c->y = sy + bh;
|
||||
if(stackpos == StackBottom)
|
||||
c->y += master;
|
||||
c->w = stackw - 2 * BORDERPX;
|
||||
c->h = stackh - 2 * BORDERPX;
|
||||
}
|
||||
}
|
||||
resize(c, False, TopLeft);
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue