diff options
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -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++) { |
