X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/105fbe1ffa8968cb85fd2cac7192957e522d17ba..21b2dde583e83d3ad455c20fa8db717037b5f548:/src/motif/button.cpp diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 5befa4d2f1..99324c3f9c 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -125,11 +125,9 @@ void wxButton::SetDefaultShadowThicknessAndResize() } -void wxButton::SetDefault() +wxWindow *wxButton::SetDefault() { - wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); - if ( tlw ) - tlw->SetDefaultItem(this); + wxWindow *oldDefault = wxButtonBase::SetDefault(); // We initially do not set XmNdefaultShadowThickness, to have // small buttons. Unfortunately, buttons are now mis-aligned. We @@ -151,6 +149,8 @@ void wxButton::SetDefault() XtVaSetValues ((Widget) parent->GetMainWidget(), XmNdefaultButton, (Widget) GetMainWidget(), NULL); + + return oldDefault; } static inline bool wxMotifLargeButtons()