updategeom fix for same geom screens c13be8d6
Anselm R Garbe · 2009-07-21 08:57 2 file(s) · +7 −2
config.mk +1 −1
1 1
# dwm version
2 -
VERSION = 5.7
2 +
VERSION = 5.6.1
3 3
4 4
# Customize below to fit your system
5 5
dwm.c +6 −1
1683 1683
1684 1684
void
1685 1685
updategeom(void) {
1686 -
	int i, n = 1;
1686 +
	int i, n = 1, nn;
1687 1687
	Client *c;
1688 1688
	Monitor *newmons = NULL, *m = NULL, *tm;
1689 1689
1692 1692
1693 1693
	if(XineramaIsActive(dpy))
1694 1694
		info = XineramaQueryScreens(dpy, &n);
1695 +
	for(i = 1, nn = n; i < n; i++)
1696 +
		if(info[i - 1].x_org == info[i].x_org && info[i - 1].y_org == info[i].y_org
1697 +
		&& info[i - 1].width == info[i].width && info[i - 1].height == info[i].height)
1698 +
			--nn;
1699 +
	n = nn; /* we only consider unique geometrys as separate screens */
1695 1700
#endif /* XINERAMA */
1696 1701
	/* allocate monitor(s) for the new geometry setup */
1697 1702
	for(i = 0; i < n; i++) {