diff options
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -350,9 +350,9 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) { | |||
| 350 | /* adjust for aspect limits */ | 350 | /* adjust for aspect limits */ |
| 351 | if(c->mina > 0 && c->maxa > 0) { | 351 | if(c->mina > 0 && c->maxa > 0) { |
| 352 | if(c->maxa < (float)*w / *h) | 352 | if(c->maxa < (float)*w / *h) |
| 353 | *w = *h * c->maxa; | 353 | *w = *h * c->maxa + 0.5; |
| 354 | else if(c->mina < (float)*h / *w) | 354 | else if(c->mina < (float)*h / *w) |
| 355 | *h = *w * c->mina; | 355 | *h = *w * c->mina + 0.5; |
| 356 | } | 356 | } |
| 357 | if(baseismin) { /* increment calculation requires this */ | 357 | if(baseismin) { /* increment calculation requires this */ |
| 358 | *w -= c->basew; | 358 | *w -= c->basew; |
| @@ -1807,8 +1807,8 @@ updatesizehints(Client *c) { | |||
| 1807 | else | 1807 | else |
| 1808 | c->minw = c->minh = 0; | 1808 | c->minw = c->minh = 0; |
| 1809 | if(size.flags & PAspect) { | 1809 | if(size.flags & PAspect) { |
| 1810 | c->mina = (float)size.min_aspect.y / (float)size.min_aspect.x; | 1810 | c->mina = (float)size.min_aspect.y / size.min_aspect.x; |
| 1811 | c->maxa = (float)size.max_aspect.x / (float)size.max_aspect.y; | 1811 | c->maxa = (float)size.max_aspect.x / size.max_aspect.y; |
| 1812 | } | 1812 | } |
| 1813 | else | 1813 | else |
| 1814 | c->maxa = c->mina = 0.0; | 1814 | c->maxa = c->mina = 0.0; |
