]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/mdi.cpp
Fix return value of wxCountingOutputStream::LastWrite().
[wxWidgets.git] / src / gtk / mdi.cpp
index b1242254bc8bcdcd9e28e665151f98f3c9f7126a..5480673b29e0d7c815ac4b3eae161bea03674af6 100644 (file)
@@ -191,7 +191,7 @@ void wxMDIParentFrame::DoGetClientSize(int* width, int* height) const
 {
     wxFrame::DoGetClientSize(width, height);
 
-    if (height)
+    if (!m_useCachedClientSize && height)
     {
         wxMDIChildFrame* active_child_frame = GetActiveChild();
         if (active_child_frame)
@@ -200,7 +200,7 @@ void wxMDIParentFrame::DoGetClientSize(int* width, int* height) const
             if (menubar && menubar->IsShown())
             {
                 GtkRequisition req;
-                gtk_widget_size_request(menubar->m_widget, &req);
+                gtk_widget_get_preferred_height(menubar->m_widget, NULL, &req.height);
                 *height -= req.height;
                 if (*height < 0) *height = 0;
             }