Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
a520ba3
)
aspects hints seem broken for fullscreen apps
author
Anselm R Garbe <
[email protected]
>
Tue, 1 Apr 2008 14:46:00 +0000
(15:46 +0100)
committer
Anselm R Garbe <
[email protected]
>
Tue, 1 Apr 2008 14:46:00 +0000
(15:46 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
37e833e
..
1080d2d
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-1196,9
+1196,9
@@
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
if(sizehints) {
/* set minimum possible */
if(sizehints) {
/* set minimum possible */
- if
(w < 1)
+ if(w < 1)
w = 1;
w = 1;
- if
(h < 1)
+ if(h < 1)
h = 1;
/* temporarily remove base dimensions */
h = 1;
/* temporarily remove base dimensions */
@@
-1206,7
+1206,9
@@
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
h -= c->baseh;
/* adjust for aspect limits */
h -= c->baseh;
/* 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)
w = h * c->maxax / c->maxay;
else if (w * c->minay < h * c->minax)
if (w * c->maxay > h * c->maxax)
w = h * c->maxax / c->maxay;
else if (w * c->minay < h * c->minax)