aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc4
-rw-r--r--src/Screen.hh2
-rw-r--r--src/WinClient.cc14
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
1845void BScreen::showGeometry(unsigned int gx, unsigned int gy) { 1845void 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;