diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2009-07-21 08:57:04 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2009-07-21 08:57:04 +0100 |
| commit | c13be8d620372a55f5867cafd6ad4277ad77790c (patch) | |
| tree | 5f2e10603d009a6e97273d7ea2e5f1a696ddb847 | |
| parent | applied nsz' man page comment, thanks! (diff) | |
| download | dwm-c13be8d620372a55f5867cafd6ad4277ad77790c.tar.gz dwm-c13be8d620372a55f5867cafd6ad4277ad77790c.zip | |
updategeom fix for same geom screens
| -rw-r--r-- | config.mk | 2 | ||||
| -rw-r--r-- | dwm.c | 7 |
2 files changed, 7 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | # dwm version | 1 | # dwm version |
| 2 | VERSION = 5.7 | 2 | VERSION = 5.6.1 |
| 3 | 3 | ||
| 4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
| 5 | 5 | ||
| @@ -1683,7 +1683,7 @@ updatebarpos(Monitor *m) { | |||
| 1683 | 1683 | ||
| 1684 | void | 1684 | void |
| 1685 | updategeom(void) { | 1685 | updategeom(void) { |
| 1686 | int i, n = 1; | 1686 | int i, n = 1, nn; |
| 1687 | Client *c; | 1687 | Client *c; |
| 1688 | Monitor *newmons = NULL, *m = NULL, *tm; | 1688 | Monitor *newmons = NULL, *m = NULL, *tm; |
| 1689 | 1689 | ||
| @@ -1692,6 +1692,11 @@ updategeom(void) { | |||
| 1692 | 1692 | ||
| 1693 | if(XineramaIsActive(dpy)) | 1693 | if(XineramaIsActive(dpy)) |
| 1694 | info = XineramaQueryScreens(dpy, &n); | 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 | #endif /* XINERAMA */ | 1700 | #endif /* XINERAMA */ |
| 1696 | /* allocate monitor(s) for the new geometry setup */ | 1701 | /* allocate monitor(s) for the new geometry setup */ |
| 1697 | for(i = 0; i < n; i++) { | 1702 | for(i = 0; i < n; i++) { |
