]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/toplvcmn.cpp
remove unused GtkPizza members scroll_[xy]
[wxWidgets.git] / src / common / toplvcmn.cpp
index a6c9133dbdbf11b649a7d883bb339c4920df0620..101f64677f36cddcc435e282236825946a3aa55a 100644 (file)
@@ -55,6 +55,8 @@ wxTopLevelWindowBase::wxTopLevelWindowBase()
 {
     // Unlike windows, top level windows are created hidden by default.
     m_isShown = false;
+    m_winDefault = NULL;
+    m_winTmpDefault = NULL;
 }
 
 wxTopLevelWindowBase::~wxTopLevelWindowBase()
@@ -348,12 +350,18 @@ void wxTopLevelWindowBase::DoLayout()
             // for whatever reasons, wxGTK wants to have a small offset - it
             // probably looks better with it?
 #ifdef __WXGTK__
-            static const int ofs = 1;
+            const int ofs = 1;
+            clientW -= 2 * ofs;
+            clientH -= 2 * ofs;
+            if (clientW < 0)
+                clientW = 0;
+            if (clientH < 0)
+                clientH = 0;
 #else
-            static const int ofs = 0;
+            const int ofs = 0;
 #endif
 
-            child->SetSize(ofs, ofs, clientW - 2*ofs, clientH - 2*ofs);
+            child->SetSize(ofs, ofs, clientW, clientH);
         }
     }
 }
@@ -393,3 +401,14 @@ void wxTopLevelWindowBase::RequestUserAttention(int WXUNUSED(flags))
     // it's probably better than do nothing, isn't it?
     Raise();
 }
+
+void wxTopLevelWindowBase::RemoveChild(wxWindowBase *child)
+{
+    if ( child == m_winDefault )
+        m_winDefault = NULL;
+
+    if ( child == m_winTmpDefault )
+        m_winTmpDefault = NULL;
+
+    wxWindow::RemoveChild(child);
+}