updategeom fix for same geom screens
Anselm R Garbe garbeam@gmail.com
Tue, 21 Jul 2009 08:57:04 +0100
M
dwm.c
→
dwm.c
@@ -1683,7 +1683,7 @@ }
void updategeom(void) { - int i, n = 1; + int i, n = 1, nn; Client *c; Monitor *newmons = NULL, *m = NULL, *tm;@@ -1692,6 +1692,11 @@ XineramaScreenInfo *info = NULL;
if(XineramaIsActive(dpy)) info = XineramaQueryScreens(dpy, &n); + for(i = 1, nn = n; i < n; i++) + if(info[i - 1].x_org == info[i].x_org && info[i - 1].y_org == info[i].y_org + && info[i - 1].width == info[i].width && info[i - 1].height == info[i].height) + --nn; + n = nn; /* we only consider unique geometrys as separate screens */ #endif /* XINERAMA */ /* allocate monitor(s) for the new geometry setup */ for(i = 0; i < n; i++) {