]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/button.cpp
adapting the MSW way for mutex gui
[wxWidgets.git] / src / gtk / button.cpp
index 86b455462fbad78d843021a6613bb655a2d17244..177356a071c4a1d88103a61e117c402767492077 100644 (file)
@@ -154,6 +154,11 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
 
 void wxButton::SetDefault()
 {
+    wxWindow *parent = GetParent();
+    wxCHECK_RET( parent, _T("button without parent?") );
+
+    wxWindow *winOldDefault = parent->SetDefaultItem(this);
+    
     GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
     gtk_widget_grab_default( m_widget );