]> git.saurik.com Git - wxWidgets.git/commitdiff
Added Layout() call to top level window Show() to prevent double-sizing
authorJulian Smart <julian@anthemion.co.uk>
Thu, 14 Mar 2002 22:03:43 +0000 (22:03 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 14 Mar 2002 22:03:43 +0000 (22:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/x11/app.cpp
src/x11/evtloop.cpp
src/x11/toplevel.cpp

index a35a1e05460430a375f23d335163914b0b3020f8..87b09f85cc3f3087008cf487b4de13ab644d1e66 100644 (file)
@@ -648,6 +648,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
             {
                 // Only erase background, paint in idle time.
                 win->SendEraseEvents();
+                //win->Update();
             }
 
             return TRUE;
index ebe1ebb13a0389d1667d8cc09f05294e4c0001c0..483c4683f02f7d8972cf6605dffc865a77561c00 100644 (file)
@@ -170,7 +170,7 @@ int wxEventLoop::Run()
 #endif
             if (!m_impl->SendIdleEvent())
             {
-#if 0 // wxUSE_THREADS
+#if wxUSE_THREADS
                 // leave the main loop to give other threads a chance to
                 // perform their GUI work
                 wxMutexGuiLeave();
index 2fef702902d05c22284e6451d64ba8d3bf504d87..53c97f4033f49d9b19cd87ece6ce2a8d2e3ef27a 100644 (file)
@@ -260,6 +260,18 @@ bool wxTopLevelWindowX11::Show(bool show)
         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();
+        }
+    }
+
     return wxWindowX11::Show(show);
 }