Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
restricting number of mons by length of monsyms
[dwm.git]
/
dwm.c
diff --git
a/dwm.c
b/dwm.c
index
17d5218
..
fa5fdea
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-1690,6
+1690,8
@@
updategeom(void) {
if(XineramaIsActive(dpy))
info = XineramaQueryScreens(dpy, &n);
#endif /* XINERAMA */
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))))
/* allocate monitor(s) for the new geometry setup */
for(i = 0; i < n; i++) {
if(!(m = (Monitor *)malloc(sizeof(Monitor))))