diff --git a/src/osx/carbon/window.cpp b/src/osx/carbon/window.cpp index 084f7b7d6d..64ceced9dd 100644 --- a/src/osx/carbon/window.cpp +++ b/src/osx/carbon/window.cpp @@ -288,6 +288,8 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl #endif wxLogTrace(_T("Focus"), _T("focus lost(%p)"), wx_static_cast(void*, thisWindow)); + + wxPrintf( "Focus lost %s\n", thisWindow->GetClassInfo()->GetClassName() ); // remove this as soon as posting the synthesized event works properly static bool inKillFocusEvent = false ; diff --git a/src/osx/spinctrl_osx.cpp b/src/osx/spinctrl_osx.cpp index 3d2ed855aa..841b946616 100644 --- a/src/osx/spinctrl_osx.cpp +++ b/src/osx/spinctrl_osx.cpp @@ -60,7 +60,7 @@ public: } protected: - void OnKillFocus(wxFocusEvent& WXUNUSED(event)) + void OnKillFocus(wxFocusEvent& event) { long l; if ( !GetValue().ToLong(&l) ) @@ -88,13 +88,16 @@ protected: m_spin->m_btn->SetValue( l ); // if not - wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId()); - event.SetEventObject(m_spin); - event.SetInt(l); - m_spin->HandleWindowEvent(event); + wxCommandEvent cevent(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId()); + cevent.SetEventObject(m_spin); + cevent.SetInt(l); + m_spin->HandleWindowEvent(cevent); m_spin->m_oldValue = l; } + + event.SetEventObject( GetParent() ); + GetParent()->HandleWindowEvent(event); } void OnTextChange(wxCommandEvent& event)