From cea9c546c2f84f75fd1bc78dbb1818c9f39eb3d0 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 10 Jul 2003 15:49:57 +0000 Subject: [PATCH] added release event git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/slider.cpp | 11 +++++++++-- src/mac/slider.cpp | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/slider.cpp b/src/mac/carbon/slider.cpp index 94c90786e5..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, bool WXUNUSED(mouseStillDown) ) +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); diff --git a/src/mac/slider.cpp b/src/mac/slider.cpp index 94c90786e5..96fdf5102c 100644 --- a/src/mac/slider.cpp +++ b/src/mac/slider.cpp @@ -238,13 +238,20 @@ void wxSlider::Command (wxCommandEvent & event) ProcessCommand (event); } -void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart, bool WXUNUSED(mouseStillDown) ) +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); -- 2.50.0