X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fe7d506b191a94ce327c2a18733a4d3bc576cac..8b53e5a2261d192bce49d40f0019f52f73b1557a:/src/motif/notebook.cpp diff --git a/src/motif/notebook.cpp b/src/motif/notebook.cpp index 00729a08ed..4523b93e05 100644 --- a/src/motif/notebook.cpp +++ b/src/motif/notebook.cpp @@ -48,6 +48,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent) EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) + EVT_IDLE(wxNotebook::OnIdle) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) @@ -392,6 +393,33 @@ void wxNotebook::OnSize(wxSizeEvent& event) event.Skip(); } +// This was supposed to cure the non-display of the notebook +// until the user resizes the window. +// What's going on? +void wxNotebook::OnIdle(wxIdleEvent& event) +{ + static bool s_bFirstTime = TRUE; + if ( s_bFirstTime ) { + /* + wxSize sz(GetSize()); + sz.x ++; + SetSize(sz); + sz.x --; + SetSize(sz); + */ + + /* + wxSize sz(GetSize()); + wxSizeEvent sizeEvent(sz, GetId()); + sizeEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(sizeEvent); + Refresh(); + */ + s_bFirstTime = FALSE; + } + event.Skip(); +} + // Implementation: calculate the layout of the view rect // and resize the children if required bool wxNotebook::RefreshLayout(bool force)