aspects hints seem broken for fullscreen apps
This commit is contained in:
parent
a520ba3c0b
commit
6cf73e706a
1 changed files with 5 additions and 3 deletions
8
dwm.c
8
dwm.c
|
@ -1196,9 +1196,9 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
|
||||||
|
|
||||||
if(sizehints) {
|
if(sizehints) {
|
||||||
/* set minimum possible */
|
/* set minimum possible */
|
||||||
if (w < 1)
|
if(w < 1)
|
||||||
w = 1;
|
w = 1;
|
||||||
if (h < 1)
|
if(h < 1)
|
||||||
h = 1;
|
h = 1;
|
||||||
|
|
||||||
/* temporarily remove base dimensions */
|
/* temporarily remove base dimensions */
|
||||||
|
@ -1206,7 +1206,9 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
|
||||||
h -= c->baseh;
|
h -= c->baseh;
|
||||||
|
|
||||||
/* adjust for aspect limits */
|
/* adjust for aspect limits */
|
||||||
if (c->minay > 0 && c->maxay > 0 && c->minax > 0 && c->maxax > 0) {
|
if(c->minax != c->maxax && c->minay != c->maxay
|
||||||
|
&& c->minax > 0 && c->maxax > 0 && c->minay > 0 && c->maxay > 0)
|
||||||
|
{
|
||||||
if (w * c->maxay > h * c->maxax)
|
if (w * c->maxay > h * c->maxax)
|
||||||
w = h * c->maxax / c->maxay;
|
w = h * c->maxax / c->maxay;
|
||||||
else if (w * c->minay < h * c->minax)
|
else if (w * c->minay < h * c->minax)
|
||||||
|
|
Loading…
Reference in a new issue