X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d120f8391920145647ec10e84629bc21fa9f1bb..b59ff3c9c8d59c2c4e0291b964d349c9df839894:/src/motif/choice.cpp?ds=sidebyside diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index ea99402163..b950c67ef4 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -112,7 +112,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, m_mainWidget = m_buttonWidget; XtManageChild ((Widget) m_buttonWidget); - + // New code from Roland Haenel (roland_haenel@ac.cybercity.de) // Some time ago, I reported a problem with wxChoice-items under // Linux and Motif 2.0 (they caused sporadic GPFs). Now it seems @@ -120,14 +120,16 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, #if XmVersion >= 1002 #if XmVersion < 2000 Widget optionLabel = XmOptionLabelGadget ((Widget) m_buttonWidget); - XtUnmanageChild (optionLabel); + // JACS, 24/1/99: this seems to cause a malloc crash later on, e.g. + // in controls sample. + // XtUnmanageChild (optionLabel); #endif #endif - + XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL); ChangeFont(FALSE); - + AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, size.x, size.y); ChangeBackgroundColour(); @@ -347,7 +349,7 @@ void wxChoice::SetFocus() XmProcessTraversal(XtParent((Widget)m_mainWidget), XmTRAVERSE_CURRENT); } -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) +void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags) { XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_ANY, NULL); bool managed = XtIsManaged((Widget) m_formWidget); @@ -378,7 +380,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) XtManageChild ((Widget) m_formWidget); XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL); - wxControl::SetSize (x, y, width, height, sizeFlags); + wxControl::DoSetSize (x, y, width, height, sizeFlags); } wxString wxChoice::GetStringSelection () const