X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11b6a93b1e078fea5bf49ed9e6628a19849c11b3..10992a81d39da31b79063387b7b71c0ff68737ce:/src/msw/scrolbar.cpp diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index f5c9a867dd..007c98067f 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -163,8 +163,12 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, scrollEvent = wxEVT_SCROLL_PAGEDOWN; break; - case SB_THUMBTRACK: case SB_THUMBPOSITION: + nScrollInc = pos - position; + scrollEvent = wxEVT_SCROLL_THUMBRELEASE; + break; + + case SB_THUMBTRACK: nScrollInc = pos - position; scrollEvent = wxEVT_SCROLL_THUMBTRACK; break; @@ -173,9 +177,10 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, nScrollInc = 0; } - if ( nScrollInc == 0 ) + // 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 return FALSE; }