X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cf7a6c06b7c8a22084e911cfca78f8ade5b9f89..2582bcdc9d6f0e8ab66aaf6b43a1f298a7917d69:/src/gtk/toplevel.cpp diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index a43befb6c5..614a4dce0a 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -915,18 +915,16 @@ void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const if (height) { - *height = m_height; - - // mini edge - *height -= m_miniEdge*2 + m_miniTitle; + *height = m_height - 2 * m_miniEdge + m_miniTitle; + if (*height < 0) + *height = 0; } if (width) { - *width = m_width; - - *width -= m_miniEdge*2; + *width = m_width - 2 * m_miniEdge; + if (*width < 0) + *width = 0; } - } void wxTopLevelWindowGTK::DoSetClientSize( int width, int height )