if (m_frameToolBar) delete m_frameToolBar;
wxTopLevelWindows.DeleteObject( this );
- if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop();
+
+ if (wxTheApp->GetTopWindow() == this)
+ {
+ wxTheApp->SetTopWindow( (wxWindow*) NULL );
+ }
+
+ if (wxTopLevelWindows.Number() == 0)
+ {
+ wxTheApp->ExitMainLoop();
+ }
}
bool wxFrame::Show( bool show )
if (m_frameMenuBar)
{
int xx = m_miniEdge;
- int yy = m_miniEdge + m_miniTitle;
- int ww = m_width - 2*m_miniEdge;
- int hh = wxMENU_HEIGHT;
+ int yy = m_miniEdge + m_miniTitle;
+ int ww = m_width - 2*m_miniEdge;
+ int hh = wxMENU_HEIGHT;
m_frameMenuBar->m_x = xx;
m_frameMenuBar->m_y = yy;
m_frameMenuBar->m_width = ww;
if (m_frameToolBar)
{
int xx = m_miniEdge;
- int yy = m_miniEdge + m_miniTitle;
+ int yy = m_miniEdge + m_miniTitle;
if (m_frameMenuBar) yy += wxMENU_HEIGHT;
- int ww = m_width - 2*m_miniEdge;
+ int ww = m_width - 2*m_miniEdge;
int hh = m_frameToolBar->m_height;
m_frameToolBar->m_x = xx;
if (m_frameStatusBar)
{
int xx = 0 + m_miniEdge;
- int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
- int ww = m_width - 2*m_miniEdge;
- int hh = wxSTATUS_HEIGHT;
+ int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
+ int ww = m_width - 2*m_miniEdge;
+ int hh = wxSTATUS_HEIGHT;
m_frameStatusBar->m_x = xx;
m_frameStatusBar->m_y = yy;