X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03e11df5470fd64d9d9a669d0b50b84c2d714736..98ec9dbebc5584ba1b903d314b25e8c562891483:/src/mac/slider.cpp?ds=sidebyside diff --git a/src/mac/slider.cpp b/src/mac/slider.cpp index 05b29b696a..bce30a4bd1 100644 --- a/src/mac/slider.cpp +++ b/src/mac/slider.cpp @@ -133,7 +133,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, } m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , - title , true , value , minValue , maxValue, + title , false , value , minValue , maxValue, kControlSliderProc + kControlSliderLiveFeedback + ( ( style & wxSL_AUTOTICKS ) ? kControlSliderHasTickMarks : 0 ) , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -312,20 +312,13 @@ void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart SetValue( value ) ; wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId); - event.SetPosition(GetControlValue( m_macControl) ); + event.SetPosition(value); event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); -#if WXWIN_COMPATIBILITY + wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId ); + cevent.SetInt( value ); + cevent.SetEventObject( this ); - wxEventType oldEvent = event.GetEventType(); - event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED ); - if ( !GetEventHandler()->ProcessEvent(event) ) - { - event.SetEventType( oldEvent ); - if (!GetParent()->GetEventHandler()->ProcessEvent(event)) - event.Skip(); - } -#else - GetEventHandler()->ProcessEvent(event); -#endif + GetEventHandler()->ProcessEvent( cevent ); }