aboutsummaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2009-07-09 11:21:06 +0100
committerAnselm R Garbe <garbeam@gmail.com>2009-07-09 11:21:06 +0100
commit5e408d8ff65c8609898ad792cdeeac443f28be7a (patch)
tree60a7e9146ae865e7381c2af2f34f7a9346f7033b /dwm.c
parent1724f7fa43f9b2a3a3479c365e685ba23327ce2c (diff)
downloaddwm-5e408d8ff65c8609898ad792cdeeac443f28be7a.tar.gz
restricting number of mons by length of monsyms
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 17d5218..fa5fdea 100644
--- a/dwm.c
+++ b/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))))
remember that computers suck.