diff options
author | okan | 2013-11-27 14:20:32 +0000 |
---|---|---|
committer | okan | 2013-11-27 14:20:32 +0000 |
commit | fad4280d9453e32b642ed4aca146a524e6bb1458 (patch) | |
tree | af078037500c9e4187ea9eebf3fc085ad6d2d881 /client.c | |
parent | 68b96b00340cd695b13813afd2e72425b831174c (diff) | |
download | cwm-fad4280d9453e32b642ed4aca146a524e6bb1458.tar.gz |
simplify/unfold
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.150 2013/11/27 00:01:23 okan Exp $ + * $OpenBSD: client.c,v 1.151 2013/11/27 14:20:32 okan Exp $ */ #include <sys/param.h> @@ -781,12 +781,10 @@ client_applysizehints(struct client_ctx *cc) } /* adjust for aspect limits */ - if (cc->hint.mina > 0 && cc->hint.maxa > 0) { - if (cc->hint.maxa < - (float)cc->geom.w / cc->geom.h) + if (cc->hint.mina && cc->hint.maxa) { + if (cc->hint.maxa < (float)cc->geom.w / cc->geom.h) cc->geom.w = cc->geom.h * cc->hint.maxa; - else if (cc->hint.mina < - (float)cc->geom.h / cc->geom.w) + else if (cc->hint.mina < (float)cc->geom.h / cc->geom.w) cc->geom.h = cc->geom.w * cc->hint.mina; } |