commented out unused centeredmaster layout

This commit is contained in:
Alexander Bocken 2021-11-22 22:32:56 +01:00
parent 711e8d801e
commit 7476490be3
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

110
dwm.c
View File

@ -252,7 +252,7 @@ static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg); static void zoom(const Arg *arg);
static void bstack(Monitor *m); static void bstack(Monitor *m);
static void bstackhoriz(Monitor *m); static void bstackhoriz(Monitor *m);
static void centeredmaster(Monitor *m); //static void centeredmaster(Monitor *m);
static void centeredfloatingmaster(Monitor *m); static void centeredfloatingmaster(Monitor *m);
static void centeredfirstwindow(Monitor *m); static void centeredfirstwindow(Monitor *m);
@ -2471,60 +2471,60 @@ bstackhoriz(Monitor *m) {
} }
} }
void //void
centeredmaster(Monitor *m) //centeredmaster(Monitor *m)
{ //{
unsigned int i, n, h, mw, mx, my, oty, ety, tw; // unsigned int i, n, h, mw, mx, my, oty, ety, tw;
Client *c; // Client *c;
//
/* count number of clients in the selected monitor */ // /* count number of clients in the selected monitor */
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); // for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if (n == 0) // if (n == 0)
return; // return;
//
/* initialize areas */ // /* initialize areas */
mw = m->ww; // mw = m->ww;
mx = 0; // mx = 0;
my = 0; // my = 0;
tw = mw; // tw = mw;
//
if (n > m->nmaster) { // if (n > m->nmaster) {
/* go mfact box in the center if more than nmaster clients */ // /* go mfact box in the center if more than nmaster clients */
mw = m->nmaster ? m->ww * m->mfact : 0; // mw = m->nmaster ? m->ww * m->mfact : 0;
tw = m->ww - mw; // tw = m->ww - mw;
//
if (n - m->nmaster > 1) { // if (n - m->nmaster > 1) {
/* only one client */ // /* only one client */
mx = (m->ww - mw) / 2; // mx = (m->ww - mw) / 2;
tw = (m->ww - mw) / 2; // tw = (m->ww - mw) / 2;
} // }
} // }
//
oty = 0; // oty = 0;
ety = 0; // ety = 0;
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 < m->nmaster) { // if (i < m->nmaster) {
/* nmaster clients are stacked vertically, in the center // /* nmaster clients are stacked vertically, in the center
* of the screen */ // * of the screen */
h = (m->wh - my) / (MIN(n, m->nmaster) - i); // h = (m->wh - my) / (MIN(n, m->nmaster) - i);
resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), // resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw),
h - (2*c->bw), 0); // h - (2*c->bw), 0);
my += HEIGHT(c); // my += HEIGHT(c);
} else { // } else {
/* stack clients are stacked vertically */ // /* stack clients are stacked vertically */
if ((i - m->nmaster) % 2 ) { // if ((i - m->nmaster) % 2 ) {
h = (m->wh - ety) / ( (1 + n - i) / 2); // h = (m->wh - ety) / ( (1 + n - i) / 2);
resize(c, m->wx, m->wy + ety, tw - (2*c->bw), // resize(c, m->wx, m->wy + ety, tw - (2*c->bw),
h - (2*c->bw), 0); // h - (2*c->bw), 0);
ety += HEIGHT(c); // ety += HEIGHT(c);
} else { // } else {
h = (m->wh - oty) / ((1 + n - i) / 2); // h = (m->wh - oty) / ((1 + n - i) / 2);
resize(c, m->wx + mx + mw, m->wy + oty, // resize(c, m->wx + mx + mw, m->wy + oty,
tw - (2*c->bw), h - (2*c->bw), 0); // tw - (2*c->bw), h - (2*c->bw), 0);
oty += HEIGHT(c); // oty += HEIGHT(c);
} // }
} // }
} //}
void void