diff options
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r-- | src/WinClient.cc | 14 |
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; |