wxEventType scrollEvent = wxEVT_NULL;
int nScrollInc;
- bool isScrolling = TRUE;
switch ( wParam )
{
case SB_TOP:
break;
case SB_THUMBPOSITION:
- isScrolling = FALSE;
- /* fall-through */
+ nScrollInc = pos - position;
+ scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
+ break;
case SB_THUMBTRACK:
nScrollInc = pos - position;
nScrollInc = 0;
}
- if (( nScrollInc == 0 ) && isScrolling )
+ // don't process the event if there is no displacement,
+ // unless this is a thumb release event.
+ if (( nScrollInc == 0 ) && ( scrollEvent != wxEVT_SCROLL_THUMBRELEASE ))
{
- // no event to process, so don't process it
- // GRG: always process SB_THUMBPOSITION !
return FALSE;
}
wxScrollEvent event(scrollEvent, m_windowId);
event.SetPosition(new_pos);
event.SetEventObject( this );
- event.SetScrolling(isScrolling);
return GetEventHandler()->ProcessEvent(event);
}