]> Dogcows Code - chaz/openbox/commitdiff
keep things in min/max bounds properly
authorDana Jansens <danakj@orodu.net>
Mon, 10 Feb 2003 00:21:09 +0000 (00:21 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 10 Feb 2003 00:21:09 +0000 (00:21 +0000)
src/client.cc

index 254345730a84e9bbf1c22dbb9b6113a139303d6a..6f18445d4020cdd3864933d862ea9f4d14094456 100644 (file)
@@ -1149,10 +1149,10 @@ void Client::internal_resize(Corner anchor, int w, int h,
     // and aspect ratios
 
     // smaller than min size or bigger than max size?
+    if (w > _max_size.width()) w = _max_size.width();
     if (w < _min_size.width()) w = _min_size.width();
-    else if (w > _max_size.width()) w = _max_size.width();
+    if (h > _max_size.height()) h = _max_size.height();
     if (h < _min_size.height()) h = _min_size.height();
-    else if (h > _max_size.height()) h = _max_size.height();
 
     // adjust the height ot match the width for the aspect ratios
     if (_min_ratio)
This page took 0.030413 seconds and 4 git commands to generate.