From 7476490be329d819800cb9ea65ea7074b412ac7a Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 22 Nov 2021 22:32:56 +0100 Subject: [PATCH] commented out unused centeredmaster layout --- dwm.c | 110 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/dwm.c b/dwm.c index 9bc6b38..f10e73b 100644 --- a/dwm.c +++ b/dwm.c @@ -252,7 +252,7 @@ static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); static void bstack(Monitor *m); static void bstackhoriz(Monitor *m); -static void centeredmaster(Monitor *m); +//static void centeredmaster(Monitor *m); static void centeredfloatingmaster(Monitor *m); static void centeredfirstwindow(Monitor *m); @@ -2471,60 +2471,60 @@ bstackhoriz(Monitor *m) { } } -void -centeredmaster(Monitor *m) -{ - unsigned int i, n, h, mw, mx, my, oty, ety, tw; - Client *c; - - /* count number of clients in the selected monitor */ - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if (n == 0) - return; - - /* initialize areas */ - mw = m->ww; - mx = 0; - my = 0; - tw = mw; - - if (n > m->nmaster) { - /* go mfact box in the center if more than nmaster clients */ - mw = m->nmaster ? m->ww * m->mfact : 0; - tw = m->ww - mw; - - if (n - m->nmaster > 1) { - /* only one client */ - mx = (m->ww - mw) / 2; - tw = (m->ww - mw) / 2; - } - } - - oty = 0; - ety = 0; - for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if (i < m->nmaster) { - /* nmaster clients are stacked vertically, in the center - * of the screen */ - h = (m->wh - my) / (MIN(n, m->nmaster) - i); - resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), - h - (2*c->bw), 0); - my += HEIGHT(c); - } else { - /* stack clients are stacked vertically */ - if ((i - m->nmaster) % 2 ) { - h = (m->wh - ety) / ( (1 + n - i) / 2); - resize(c, m->wx, m->wy + ety, tw - (2*c->bw), - h - (2*c->bw), 0); - ety += HEIGHT(c); - } else { - h = (m->wh - oty) / ((1 + n - i) / 2); - resize(c, m->wx + mx + mw, m->wy + oty, - tw - (2*c->bw), h - (2*c->bw), 0); - oty += HEIGHT(c); - } - } -} +//void +//centeredmaster(Monitor *m) +//{ +// unsigned int i, n, h, mw, mx, my, oty, ety, tw; +// Client *c; +// +// /* count number of clients in the selected monitor */ +// for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); +// if (n == 0) +// return; +// +// /* initialize areas */ +// mw = m->ww; +// mx = 0; +// my = 0; +// tw = mw; +// +// if (n > m->nmaster) { +// /* go mfact box in the center if more than nmaster clients */ +// mw = m->nmaster ? m->ww * m->mfact : 0; +// tw = m->ww - mw; +// +// if (n - m->nmaster > 1) { +// /* only one client */ +// mx = (m->ww - mw) / 2; +// tw = (m->ww - mw) / 2; +// } +// } +// +// oty = 0; +// ety = 0; +// for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) +// if (i < m->nmaster) { +// /* nmaster clients are stacked vertically, in the center +// * of the screen */ +// h = (m->wh - my) / (MIN(n, m->nmaster) - i); +// resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), +// h - (2*c->bw), 0); +// my += HEIGHT(c); +// } else { +// /* stack clients are stacked vertically */ +// if ((i - m->nmaster) % 2 ) { +// h = (m->wh - ety) / ( (1 + n - i) / 2); +// resize(c, m->wx, m->wy + ety, tw - (2*c->bw), +// h - (2*c->bw), 0); +// ety += HEIGHT(c); +// } else { +// h = (m->wh - oty) / ((1 + n - i) / 2); +// resize(c, m->wx + mx + mw, m->wy + oty, +// tw - (2*c->bw), h - (2*c->bw), 0); +// oty += HEIGHT(c); +// } +// } +//} void