]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/toplevel.cpp
don't write the strings to the stream one char at a time, it's *horribly* slow
[wxWidgets.git] / src / x11 / toplevel.cpp
index eb297ec92d6b3d3f9cafbf3d163afcee535a5770..c9babe382597573abed672b42197116ed1b78dc5 100644 (file)
@@ -264,7 +264,10 @@ void wxTopLevelWindowX11::OnInternalIdle()
 {
     wxWindow::OnInternalIdle();
     
-    if (m_needResizeInIdle)
+    // Do this only after the last idle event so that
+    // all windows have been updated before a new
+    // round of size events is sent
+    if (m_needResizeInIdle && !wxTheApp->Pending())
     {
         wxSizeEvent event( GetClientSize(), GetId() );
         event.SetEventObject( this );
@@ -280,31 +283,15 @@ void wxTopLevelWindowX11::OnInternalIdle()
 
 bool wxTopLevelWindowX11::Show(bool show)
 {
-    // Nano-X has to force a size event,
-    // else there's no initial size.
-#if wxUSE_NANOX
     if (show)
-#else
-    if (show && m_needResizeInIdle)
-#endif
     {
         wxSizeEvent event(GetSize(), GetId());
+        
         event.SetEventObject(this);
         GetEventHandler()->ProcessEvent(event);
         
         m_needResizeInIdle = FALSE;
     }
-    if (show)
-    {
-        // This does the layout _before_ the
-        // window is shown, else the items are
-        // drawn first at the wrong positions,
-        // then at the correct positions.
-        if (GetAutoLayout())
-        {
-            Layout();
-        }
-    }
 
     bool ret = wxWindowX11::Show(show);