diff options
author | markt <markt> | 2006-07-20 11:16:09 (GMT) |
---|---|---|
committer | markt <markt> | 2006-07-20 11:16:09 (GMT) |
commit | 9be679dad71f81e85d6e55dd11c662b17e73d937 (patch) | |
tree | dd63a8be7f3e88b3f1203c47e1c545fb327321e1 /src | |
parent | 7a22210864b59c06bba6ca6530bb5e69c9772517 (diff) | |
download | fluxbox_lack-9be679dad71f81e85d6e55dd11c662b17e73d937.zip fluxbox_lack-9be679dad71f81e85d6e55dd11c662b17e73d937.tar.bz2 |
allow negative width and height
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/Screen.hh | 2 | ||||
-rw-r--r-- | src/WinClient.cc | 14 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index a8f02c2..154dd11 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1841,8 +1841,8 @@ void BScreen::hidePosition() { | |||
1841 | } | 1841 | } |
1842 | } | 1842 | } |
1843 | 1843 | ||
1844 | 1844 | // can be negative when base_width/height > min_width/height | |
1845 | void BScreen::showGeometry(unsigned int gx, unsigned int gy) { | 1845 | void BScreen::showGeometry(int gx, int gy) { |
1846 | if (!doShowWindowPos()) | 1846 | if (!doShowWindowPos()) |
1847 | return; | 1847 | return; |
1848 | 1848 | ||
diff --git a/src/Screen.hh b/src/Screen.hh index 0a1eaf8..d4aea5e 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -286,7 +286,7 @@ public: | |||
286 | void showPosition(int x, int y); | 286 | void showPosition(int x, int y); |
287 | void hidePosition(); | 287 | void hidePosition(); |
288 | /// show geomentry with "width x height"-text, not size of window | 288 | /// show geomentry with "width x height"-text, not size of window |
289 | void showGeometry(unsigned int width, unsigned int height); | 289 | void showGeometry(int width, int height); |
290 | void hideGeometry(); | 290 | void hideGeometry(); |
291 | 291 | ||
292 | void notifyReleasedKeys(XKeyEvent &ke); | 292 | void notifyReleasedKeys(XKeyEvent &ke); |
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; |