]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
make it possible to create wxWindowDC for a hidden window
[wxWidgets.git] / src / gtk / toplevel.cpp
index a43befb6c599e85816e6ffd28df341ee154b4cb2..614a4dce0af589ef047dc9a46706445c01da08e1 100644 (file)
@@ -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 )