mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Fibonacci updates
This commit is contained in:
parent
ac4c5081c5
commit
0b429b4994
@ -446,11 +446,11 @@ arrange_gapplessgrid(Monitor *m, int x, int y, int h, int w, int ih, int iv, int
|
|||||||
|
|
||||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||||
if (i >= ai && i < (ai + an)) {
|
if (i >= ai && i < (ai + an)) {
|
||||||
if (cc/rows + 1 > cols - an%cols) {
|
if (cc/rows + 1 > cols - an%cols) {
|
||||||
rows = an/cols + 1;
|
rows = an/cols + 1;
|
||||||
ch = (h - ih * (rows - 1)) / rows;
|
ch = (h - ih * (rows - 1)) / rows;
|
||||||
rrest = (h - ih * (rows - 1)) - ch * rows;
|
rrest = (h - ih * (rows - 1)) - ch * rows;
|
||||||
}
|
}
|
||||||
resize(c,
|
resize(c,
|
||||||
x,
|
x,
|
||||||
y + rn*(ch + ih) + MIN(rn, rrest),
|
y + rn*(ch + ih) + MIN(rn, rrest),
|
||||||
@ -537,10 +537,14 @@ arrange_fibonacci(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n,
|
|||||||
ny += nh + ih;
|
ny += nh + ih;
|
||||||
}
|
}
|
||||||
if ((i % 4) == 0) {
|
if ((i % 4) == 0) {
|
||||||
if (s)
|
if (s) {
|
||||||
ny += nh + ih;
|
ny += nh + ih;
|
||||||
else
|
nh += hrest;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
nh -= hrest;
|
||||||
ny -= nh + ih;
|
ny -= nh + ih;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((i % 4) == 1) {
|
else if ((i % 4) == 1) {
|
||||||
nx += nw + iv;
|
nx += nw + iv;
|
||||||
@ -559,11 +563,14 @@ arrange_fibonacci(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n,
|
|||||||
} else {
|
} else {
|
||||||
nw -= wrest;
|
nw -= wrest;
|
||||||
nx -= nw + iv;
|
nx -= nw + iv;
|
||||||
|
nh += hrest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
if (an != 1)
|
if (an != 1) {
|
||||||
nw = (w - iv) * m->mfact;
|
nw = (w - iv) - (w - iv) * (1 - m->mfact);
|
||||||
|
wrest = 0;
|
||||||
|
}
|
||||||
ny = y;
|
ny = y;
|
||||||
}
|
}
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user