added offest for first centered window width
This commit is contained in:
parent
39f2c5354f
commit
86ce7af866
1
config.h
1
config.h
@ -8,6 +8,7 @@ static const int showbar = 1; /* 0 means no bar */
|
|||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const int vertpad = 10; /* vertical padding of bar */
|
static const int vertpad = 10; /* vertical padding of bar */
|
||||||
static const int sidepad = 20; /* horizontal padding of bar */
|
static const int sidepad = 20; /* horizontal padding of bar */
|
||||||
|
static const float firstwindowoffset = 0.1; /* render first window 10% larger than mfact would for firstwindowcentered layout */
|
||||||
static const char *fonts[] = { "monospace:size=13",
|
static const char *fonts[] = { "monospace:size=13",
|
||||||
"IPAGothic:size=13",
|
"IPAGothic:size=13",
|
||||||
"symbola:size=13"};
|
"symbola:size=13"};
|
||||||
|
5
dwm.c
5
dwm.c
@ -17,7 +17,6 @@
|
|||||||
* client.
|
* client.
|
||||||
*
|
*
|
||||||
* Keys and tagging rules are organized as arrays and defined in config.h.
|
* Keys and tagging rules are organized as arrays and defined in config.h.
|
||||||
*
|
|
||||||
* To understand everything else, start reading main().
|
* To understand everything else, start reading main().
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -2507,10 +2506,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 : 0;
|
mw = m->nmaster ? m->ww * (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 : 0;
|
mh = m->nmaster ? m->wh * (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;
|
||||||
|
Loading…
Reference in New Issue
Block a user