aboutsummaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2009-07-21 08:57:04 +0100
committerAnselm R Garbe <garbeam@gmail.com>2009-07-21 08:57:04 +0100
commitc13be8d620372a55f5867cafd6ad4277ad77790c (patch)
tree5f2e10603d009a6e97273d7ea2e5f1a696ddb847 /dwm.c
parentdc39ae85681db71c6cfcaac442c1317c8b313566 (diff)
downloaddwm-c13be8d620372a55f5867cafd6ad4277ad77790c.tar.gz
updategeom fix for same geom screens
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index e22ea7a..43f0fd5 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1683,7 +1683,7 @@ updatebarpos(Monitor *m) {
void
updategeom(void) {
- int i, n = 1;
+ int i, n = 1, nn;
Client *c;
Monitor *newmons = NULL, *m = NULL, *tm;
@@ -1692,6 +1692,11 @@ updategeom(void) {
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++) {
remember that computers suck.