X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/798a4529fe37bfd1864b4ed350e7de603bd40f2b..dd91da4ed1e9d2ba5d3bc2fae64a8e4ea86b5d41:/src/motif/frame.cpp diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 4dd023b994..2b8dc03fff 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -169,8 +169,8 @@ bool wxFrame::Create(wxWindow *parent, SetTitle( title ); wxLogTrace(wxTRACE_Messages, - "Created frame (0x%08x) with work area 0x%08x and client " - "area 0x%08x", m_mainWidget, m_workArea, m_clientArea); + "Created frame (0x%p) with work area 0x%p and client " + "area 0x%p", m_mainWidget, m_workArea, m_clientArea); XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE, wxUniversalRepaintProc, (XtPointer) this); @@ -591,10 +591,11 @@ void wxFrame::OnActivate(wxActivateEvent& event) if (!event.GetActive()) return; - for(wxNode *node = GetChildren().First(); node; node = node->Next()) + for(wxWindowList::Node *node = GetChildren().GetFirst(); node; + node = node->GetNext()) { // Find a child that's a subwindow, but not a dialog box. - wxWindow *child = (wxWindow *)node->Data(); + wxWindow *child = node->GetData(); if (!child->IsTopLevel()) { child->SetFocus(); @@ -603,6 +604,13 @@ void wxFrame::OnActivate(wxActivateEvent& event) } } +void wxFrame::SendSizeEvent() +{ + wxSizeEvent event(GetSize(), GetId()); + event.SetEventObject(this); + GetEventHandler()->AddPendingEvent(event); +} + #if wxUSE_TOOLBAR wxToolBar* wxFrame::CreateToolBar(long style, @@ -617,6 +625,12 @@ wxToolBar* wxFrame::CreateToolBar(long style, return m_frameToolBar; } +void wxFrame::SetToolBar(wxToolBar *toolbar) +{ + wxFrameBase::SetToolBar(toolbar); + SendSizeEvent(); +} + void wxFrame::PositionToolBar() { wxToolBar* tb = GetToolBar();