X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f3e7ecc5d0437877b93b799f57dcab019d0a5bc..e5ee4c908b9dbcf07f0441aa74d8635b7343be4d:/src/gtk1/window.cpp?ds=inline diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 6f221dd9a4..b2941feb0a 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2726,10 +2726,15 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags if (height == -1) m_height = 26; } - if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; - if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; + int minWidth = GetMinWidth(), + minHeight = GetMinHeight(), + maxWidth = GetMaxWidth(), + maxHeight = GetMaxHeight(); + + if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; + if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; + if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth; + if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight; int border = 0; int bottom_border = 0;