X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..7fb357a795b41c4c7fd5bcbfcac2a1faffb4f19c:/src/mac/carbon/slider.cpp?ds=inline diff --git a/src/mac/carbon/slider.cpp b/src/mac/carbon/slider.cpp index 87d4e58609..96fdf5102c 100644 --- a/src/mac/carbon/slider.cpp +++ b/src/mac/carbon/slider.cpp @@ -238,13 +238,20 @@ void wxSlider::Command (wxCommandEvent & event) ProcessCommand (event); } -void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart, bool mouseStillDown ) { SInt16 value = ::GetControl32BitValue( (ControlHandle) m_macControl ) ; SetValue( value ) ; - wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId); + wxEventType scrollEvent = wxEVT_NULL ; + + if ( mouseStillDown ) + scrollEvent = wxEVT_SCROLL_THUMBTRACK; + else + scrollEvent = wxEVT_SCROLL_THUMBRELEASE; + + wxScrollEvent event(scrollEvent, m_windowId); event.SetPosition(value); event.SetEventObject( this ); GetEventHandler()->ProcessEvent(event);