aboutsummaryrefslogtreecommitdiff
path: root/src/WindowState.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-09 13:31:54 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-09 13:31:54 (GMT)
commit77f39235cf3ad79c5ff7d2b0f4717660476f3cf4 (patch)
tree45cc07526285fc74af54f340782eb11a9d7bc55c /src/WindowState.cc
parent1657374940998176c7b63eb3296265fe6fbb5458 (diff)
downloadfluxbox-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.zip
fluxbox-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.tar.bz2
added FbTk::Util::clamp() and simplified related code
Diffstat (limited to 'src/WindowState.cc')
-rw-r--r--src/WindowState.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/WindowState.cc b/src/WindowState.cc
index 6632b66..1e650d8 100644
--- a/src/WindowState.cc
+++ b/src/WindowState.cc
@@ -246,10 +246,8 @@ void SizeHints::apply(unsigned int &width, unsigned int &height,
246 w = increaseToMultiple(h * min_aspect_x / min_aspect_y, width_inc); 246 w = increaseToMultiple(h * min_aspect_x / min_aspect_y, width_inc);
247 } 247 }
248 248
249 unsigned int max_w = make_fit && (width < max_width || max_width == 0) ? 249 unsigned int max_w = (make_fit && (width < max_width || max_width == 0)) ? width : max_width;
250 width : max_width; 250 unsigned int max_h = (make_fit && (height < max_height || max_height == 0)) ? height : max_height;
251 unsigned int max_h = make_fit && (height < max_height || max_height == 0) ?
252 height : max_height;
253 251
254 // Check maximum size 252 // Check maximum size
255 if (max_w > 0 && w + base_width > max_w) 253 if (max_w > 0 && w + base_width > max_w)