X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/338dd992160bf20205743c092b353d96ef7604fb..1b0b798d77b7b93b81d62162b290441bc9175e3e:/src/motif/button.cpp diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 6953b76006..645f99cf44 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -13,6 +13,12 @@ #pragma implementation "button.h" #endif +#ifdef __VMS +#define XtDisplay XTDISPLAY +#endif + +#include "wx/defs.h" + #include "wx/button.h" #include "wx/utils.h" #include "wx/panel.h" @@ -30,9 +36,7 @@ void wxButtonCallback (Widget w, XtPointer clientData, XtPointer ptr); -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif // Button @@ -106,9 +110,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, void wxButton::SetDefault() { wxWindow *parent = GetParent(); - wxPanel *panel = wxDynamicCast(parent, wxPanel); - if ( panel ) - panel->SetDefaultItem(this); + if ( parent ) + parent->SetDefaultItem(this); // We initially do not set XmNdefaultShadowThickness, to have small buttons. // Unfortunately, buttons are now mis-aligned. We try to correct this