Added Layout() call to top level window Show() to prevent double-sizing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -648,6 +648,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
{
|
{
|
||||||
// Only erase background, paint in idle time.
|
// Only erase background, paint in idle time.
|
||||||
win->SendEraseEvents();
|
win->SendEraseEvents();
|
||||||
|
//win->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -170,7 +170,7 @@ int wxEventLoop::Run()
|
|||||||
#endif
|
#endif
|
||||||
if (!m_impl->SendIdleEvent())
|
if (!m_impl->SendIdleEvent())
|
||||||
{
|
{
|
||||||
#if 0 // wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
// leave the main loop to give other threads a chance to
|
// leave the main loop to give other threads a chance to
|
||||||
// perform their GUI work
|
// perform their GUI work
|
||||||
wxMutexGuiLeave();
|
wxMutexGuiLeave();
|
||||||
|
@@ -260,6 +260,18 @@ bool wxTopLevelWindowX11::Show(bool show)
|
|||||||
m_needResizeInIdle = FALSE;
|
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);
|
return wxWindowX11::Show(show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user