prevent screen overflow with firstwindowoffset

This commit is contained in:
Alexander Bocken 2021-05-10 17:24:46 +02:00
parent 3cd4128998
commit eda254b64f
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

4
dwm.c
View File

@ -2509,10 +2509,10 @@ centeredfirstwindow(Monitor *m)
/* initialize nmaster area */ /* initialize nmaster area */
if (m->ww > m->wh) { if (m->ww > m->wh) {
mw = m->nmaster ? m->ww * (m->mfact + firstwindowoffset) : 0; mw = m->nmaster ? m->ww * MIN(1.0, (m->mfact + firstwindowoffset)) : 0;
mh = m->nmaster ? m->wh : 0; mh = m->nmaster ? m->wh : 0;
} else { } else {
mh = m->nmaster ? m->wh * (m->mfact + firstwindowoffset) : 0; mh = m->nmaster ? m->wh * MIN(1.0, (m->mfact + firstwindowoffset)) : 0;
mw = m->nmaster ? m->ww : 0; mw = m->nmaster ? m->ww : 0;
} }
mx = mxo = (m->ww - mw) / 2; mx = mxo = (m->ww - mw) / 2;