aboutsummaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-07-03 21:08:07 (GMT)
committermarkt <markt>2007-07-03 21:08:07 (GMT)
commit823ce0d0175b9b14a549117a303cc9e36e81c1a2 (patch)
tree0c8fc51a360db9b88f793663cb89eb79d4d76ca5 /src/WinClient.cc
parent24c023192fd5757bd1e1308f3aa00a41d0e21728 (diff)
downloadfluxbox-823ce0d0175b9b14a549117a303cc9e36e81c1a2.zip
fluxbox-823ce0d0175b9b14a549117a303cc9e36e81c1a2.tar.bz2
stop gvim from repeatedly resizing tabbed windows
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index d4e3e72..989088b 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -884,6 +884,31 @@ void WinClient::applySizeHints(int &width, int &height,
884 *display_height = j; 884 *display_height = j;
885} 885}
886 886
887// check if the given width and height satisfy the size hints
888bool WinClient::checkSizeHints(unsigned int width, unsigned int height) {
889 if (width < min_width || height < min_height)
890 return false;
891
892 if (width > max_width || height > max_height)
893 return false;
894
895 if ((width - base_width) % width_inc != 0)
896 return false;
897
898 if ((height - base_height) % height_inc != 0)
899 return false;
900
901 double ratio = (double)width / (double)height;
902
903 if (min_aspect_y > 0 && (double)min_aspect_x / (double)min_aspect_y > ratio)
904 return false;
905
906 if (max_aspect_y > 0 && (double)max_aspect_x / (double)max_aspect_y < ratio)
907 return false;
908
909 return true;
910}
911
887void WinClient::removeTransientFromWaitingList() { 912void WinClient::removeTransientFromWaitingList() {
888 913
889 // holds the windows that dont have empty 914 // holds the windows that dont have empty