- wxEventType evtType;
- if ( win->m_isScrolling )
- evtType = wxEVT_SCROLL_THUMBTRACK;
- // it could seem that UP/DOWN are inversed but this is what wxMSW does
- else if ( AreSameAdjustValues(diff, adjust->step_increment) )
- evtType = wxEVT_SCROLL_LINEDOWN;
- else if ( AreSameAdjustValues(diff, -adjust->step_increment) )
- evtType = wxEVT_SCROLL_LINEUP;
- else if ( AreSameAdjustValues(diff, adjust->page_increment) )
- evtType = wxEVT_SCROLL_PAGEDOWN;
- else if ( AreSameAdjustValues(diff, -adjust->page_increment) )
- evtType = wxEVT_SCROLL_PAGEUP;
- else if ( AreSameAdjustValues(adjust->value, adjust->lower) )
- evtType = wxEVT_SCROLL_TOP;
- else if ( AreSameAdjustValues(adjust->value, adjust->upper) )
- evtType = wxEVT_SCROLL_BOTTOM;
-
- ProcessScrollEvent(win, evtType, dvalue);
-
- win->m_oldPos = dvalue;
+ win->m_scrollEventType = GTK_SCROLL_NONE;
+
+ // If integral position has changed
+ if (wxRound(oldPos) != pos)
+ {
+ wxCHECK_RET(eventType != wxEVT_NULL, _T("Unknown slider scroll event type"));
+ ProcessScrollEvent(win, eventType);
+ win->m_needThumbRelease = eventType == wxEVT_SCROLL_THUMBTRACK;
+ }
+}