fixed diff file for fibonacci
This commit is contained in:
parent
e4d85a9895
commit
91e779fd89
@ -1,13 +1,35 @@
|
|||||||
This patch automatically centers if only one window is open in fibonacci (and that window can't make use of the whole screen)
|
diff --git a/fibonacci.c b/fibonacci.c
|
||||||
If there are multiple windows and the master window does not take up all it's alloted space, everything will be adjusted so no empty space is created.
|
index c50667e..99c370a 100644
|
||||||
--- fibonacci.c 2020-08-24 09:22:31.596464187 +0200
|
--- a/fibonacci.c
|
||||||
+++ fibonacci.c 2020-08-24 09:22:16.013131432 +0200
|
+++ b/fibonacci.c
|
||||||
@@ -43,9 +45,18 @@
|
@@ -12,14 +12,7 @@ fibonacci(Monitor *mon, int s) {
|
||||||
|
nw = mon->ww;
|
||||||
|
nh = mon->wh;
|
||||||
|
|
||||||
|
- if(n==1){
|
||||||
|
- c = nexttiled(mon->clients);
|
||||||
|
- int altw = WIDTH(c)*mon->wh/HEIGHT(c);
|
||||||
|
- if ( c->mina > 0 && altw < c->mon->mw ){
|
||||||
|
- nx = c->mon->mx + (c->mon->mw - altw ) / 2;
|
||||||
|
- resize(c, nx, ny, nw , nh , False);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
|
||||||
|
for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) {
|
||||||
|
if((i % 2 && nh / 2 > 2 * c->bw)
|
||||||
|
@@ -52,15 +45,18 @@ fibonacci(Monitor *mon, int s) {
|
||||||
}
|
}
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
{
|
{
|
||||||
- if(n != 1)
|
- if(n != 1)
|
||||||
|
-
|
||||||
- nw = mon->ww *mon->mfact;
|
- nw = mon->ww *mon->mfact;
|
||||||
|
- unsigned int altw = WIDTH(c) * mon->wh / HEIGHT(c);
|
||||||
|
- nw = c->mina > 0 && altw < nw ? altw : nw;
|
||||||
|
- //if ( c->mina > 0 && altw < nw){
|
||||||
|
- // nw = altw;
|
||||||
|
- //}
|
||||||
- ny = mon->wy;
|
- ny = mon->wy;
|
||||||
+ unsigned int altw = WIDTH(c) * mon->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */
|
+ unsigned int altw = WIDTH(c) * mon->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */
|
||||||
+ if( n==1 ){
|
+ if( n==1 ){
|
||||||
|
Loading…
Reference in New Issue
Block a user