Commit 5e408d8

Anselm R Garbe <garbeam@gmail.com>
2009-07-09 06:21:06
restricting number of mons by length of monsyms
1 parent 1724f7f
Changed files (2)
config.def.h
@@ -14,7 +14,7 @@ static const Bool showbar           = True;     /* False means no bar */
 static const Bool topbar            = True;     /* False means bottom bar */
 
 /* monitor(s) symbols */
-static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" };
+static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" };
 
 /* tagging */
 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
dwm.c
@@ -1690,6 +1690,8 @@ updategeom(void) {
 	if(XineramaIsActive(dpy))
 		info = XineramaQueryScreens(dpy, &n);
 #endif /* XINERAMA */
+	if(n > LENGTH(monsyms))
+		n = LENGTH(monsyms);
 	/* allocate monitor(s) for the new geometry setup */
 	for(i = 0; i < n; i++) {
 		if(!(m = (Monitor *)malloc(sizeof(Monitor))))