]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/slider.cpp
Fixes errno.h problems with OS/2
[wxWidgets.git] / src / mac / slider.cpp
index 05b29b696adb2240abdf004566d6fb949d3b708e..ffb6631aca0c0956a0881865dfc665bc138260f0 100644 (file)
@@ -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 );
 }