X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=314d15097a8862860bfd77fae51353c2d2666c4d;hp=289b508ff286030ee8c17f8d67dc44c76d3d2a30;hb=244addb3f4253e1cd35dc9af504b3172aaccd576;hpb=6877a00033f4785049928bfe7e98d754e1c757a9 diff --git a/dwm.c b/dwm.c index 289b508..314d150 100644 --- a/dwm.c +++ b/dwm.c @@ -350,9 +350,9 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) { /* adjust for aspect limits */ if(c->mina > 0 && c->maxa > 0) { if(c->maxa < (float)*w / *h) - *w = *h * c->maxa + 0.5; /* -Os double upcast workaround */ + *w = *h * c->maxa + 0.5; else if(c->mina < (float)*h / *w) - *h = *w * c->mina + 0.5; /* -Os double upcast workaround */ + *h = *w * c->mina + 0.5; } if(baseismin) { /* increment calculation requires this */ *w -= c->basew; @@ -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 geometries as separate screens */ #endif /* XINERAMA */ /* allocate monitor(s) for the new geometry setup */ for(i = 0; i < n; i++) {