X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..99e8cb505ad94704ec6596d20842ca8fa34e7d9e:/src/mac/carbon/scrolbar.cpp diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index ad843c3fd9..eef2a84c54 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -105,7 +105,7 @@ void wxScrollBar::Command(wxCommandEvent& event) ProcessCommand(event); } -void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) { if ( (ControlHandle) m_macControl == NULL ) return ; @@ -117,6 +117,10 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart wxEventType scrollEvent = wxEVT_NULL; int nScrollInc; + // all events have already been reported during mouse down, except for THUMBRELEASE + if ( !mouseStillDown && controlpart !=kControlIndicatorPart ) + return ; + switch( controlpart ) { case kControlUpButtonPart : @@ -137,7 +141,10 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart break ; case kControlIndicatorPart : nScrollInc = 0 ; - scrollEvent = wxEVT_SCROLL_THUMBTRACK; + if ( mouseStillDown ) + scrollEvent = wxEVT_SCROLL_THUMBTRACK; + else + scrollEvent = wxEVT_SCROLL_THUMBRELEASE; break ; default : wxFAIL_MSG(wxT("illegal scrollbar selector"));