restricting number of mons by length of monsyms 5e408d8f
Anselm R Garbe · 2009-07-09 11:21 2 file(s) · +3 −1
config.def.h +1 −1
14 14
static const Bool topbar            = True;     /* False means bottom bar */
15 15
16 16
/* monitor(s) symbols */
17 -
static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" };
17 +
static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" };
18 18
19 19
/* tagging */
20 20
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
dwm.c +2 −0
1690 1690
	if(XineramaIsActive(dpy))
1691 1691
		info = XineramaQueryScreens(dpy, &n);
1692 1692
#endif /* XINERAMA */
1693 +
	if(n > LENGTH(monsyms))
1694 +
		n = LENGTH(monsyms);
1693 1695
	/* allocate monitor(s) for the new geometry setup */
1694 1696
	for(i = 0; i < n; i++) {
1695 1697
		if(!(m = (Monitor *)malloc(sizeof(Monitor))))