aboutsummaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
authormarkt <markt>2006-07-20 11:16:09 (GMT)
committermarkt <markt>2006-07-20 11:16:09 (GMT)
commit9be679dad71f81e85d6e55dd11c662b17e73d937 (patch)
treedd63a8be7f3e88b3f1203c47e1c545fb327321e1 /src/WinClient.cc
parent7a22210864b59c06bba6ca6530bb5e69c9772517 (diff)
downloadfluxbox-9be679dad71f81e85d6e55dd11c662b17e73d937.zip
fluxbox-9be679dad71f81e85d6e55dd11c662b17e73d937.tar.bz2
allow negative width and height
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 0eddac5..daf3d42 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -842,11 +842,15 @@ void WinClient::applySizeHints(int &width, int &height,
842 842
843 // enforce incremental size limits, wrt base size 843 // enforce incremental size limits, wrt base size
844 // only calculate this if we really need to 844 // only calculate this if we really need to
845 i = (width - base_width) / width_inc; 845 i = (width - static_cast<signed>(base_width)) /
846 width = i*width_inc + base_width; 846 static_cast<signed>(width_inc);
847 847 width = i*static_cast<signed>(width_inc) +
848 j = (height - base_height) / height_inc; 848 static_cast<signed>(base_width);
849 height = j*height_inc + base_height; 849
850 j = (height - static_cast<signed>(base_height)) /
851 static_cast<signed>(height_inc);
852 height = j*static_cast<signed>(height_inc) +
853 static_cast<signed>(base_height);
850 854
851 if (display_width) 855 if (display_width)
852 *display_width = i; 856 *display_width = i;