void Init();
wxString m_title;
- bool m_fsIsShowing; /* full screen */
+ bool m_fsIsShowing:1; /* full screen */
long m_fsSaveStyle;
long m_fsSaveFlag;
wxRect m_fsSaveFrame;
// is the frame currently iconized?
- bool m_isIconized;
+ bool m_isIconized:1;
// and maximized?
- bool m_isMaximized;
+ bool m_isMaximized:1;
wxRect m_savedFrame;
+
+ // did we sent wxSizeEvent at least once?
+ bool m_sizeSet:1;
};
#endif // __WX_TOPLEVEL_H__
struct window_t *m_wnd;
// whether there should be wxEraseEvent before wxPaintEvent or not
// (see wxWindow::Refresh)
- bool m_frozen;
- bool m_refreshAfterThaw;
+ bool m_frozen:1;
+ bool m_refreshAfterThaw:1;
int m_eraseBackground;
// implement the base class pure virtuals
#if wxUSE_CLIPBOARD
+// FIXME_MGL
IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject)
m_impl->SetExitCode(rc);
m_impl->SetKeepLooping(FALSE);
+
+ // Send a dummy event so that the app won't block in EVT_halt if there
+ // are no user-generated events in the queue:
+ EVT_post(0, EVT_USEREVT, 0, 0);
}
// ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
+// FIXME_MGL
m_isIconized = FALSE;
m_isMaximized = FALSE;
m_fsIsShowing = FALSE;
+ m_sizeSet = FALSE;
}
bool wxTopLevelWindowMGL::Create(wxWindow *parent,
bool wxTopLevelWindowMGL::Show(bool show)
{
bool ret = wxTopLevelWindowBase::Show(show);
+
+ // If this is the first time Show was called, send size event,
+ // so that the frame can adjust itself (think auto layout or single child)
+ if ( !m_sizeSet )
+ {
+ m_sizeSet = TRUE;
+ wxSizeEvent event(GetSize(), GetId());
+ event.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(event);
+ }
+
if ( ret && show && AcceptsFocus() )
SetFocus();
// FIXME_MGL -- don't do this for popup windows?
#if 0 // FIXME_MGL -- debugging stuff!
dc->setColorRGB(255,0,255);
dc->fillRect(-1000,-1000,2000,2000);
- wxUsleep(100);
+ wxUsleep(50);
#endif
MGLRegion clip;