]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/mdi.cpp
derive wxSTC from wxTextEntryBase to provide even more wxTextCtrl-like methods (see...
[wxWidgets.git] / src / gtk / mdi.cpp
index ef4c027e25f4bcfef8d6b2e8bd5dcc2f980c442f..4a7ddf7c9fe868e798ea233a039ed6e43f5356af 100644 (file)
@@ -99,11 +99,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
                               long style,
                               const wxString& name )
 {
-    wxFrame::Create( parent, id, title, pos, size, style, name );
+    if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
+        return false;
 
-    OnCreateClient();
+    m_clientWindow = OnCreateClient();
 
-    return true;
+    return m_clientWindow != NULL;
 }
 
 void wxMDIParentFrame::OnInternalIdle()
@@ -246,8 +247,7 @@ wxMDIClientWindow *wxMDIParentFrame::GetClientWindow() const
 
 wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
 {
-    m_clientWindow = new wxMDIClientWindow( this );
-    return m_clientWindow;
+    return new wxMDIClientWindow( this );
 }
 
 void wxMDIParentFrame::ActivateNext()
@@ -293,6 +293,10 @@ wxMDIChildFrame::~wxMDIChildFrame()
 {
     if (m_menuBar)
         delete m_menuBar;
+
+    // wxMDIClientWindow does not get redrawn properly after last child is removed
+    if (m_parent && m_parent->GetChildren().size() <= 1)
+        gtk_widget_queue_draw(m_parent->m_widget);
 }
 
 bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,