Commit d9310e76 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Fix for listview wheelmouse message handling.

parent de41ddca
...@@ -7325,22 +7325,16 @@ static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta) ...@@ -7325,22 +7325,16 @@ static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta)
* listview should be scrolled by a multiple of 37 dependently on its dimension or its visible item number * listview should be scrolled by a multiple of 37 dependently on its dimension or its visible item number
* should be fixed in the future. * should be fixed in the future.
*/ */
if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (gcWheelDelta < 0) ?
LISTVIEW_VScroll(infoPtr, SB_THUMBPOSITION, LISTVIEW_SCROLL_ICON_LINE_SIZE : -LISTVIEW_SCROLL_ICON_LINE_SIZE, 0);
scrollInfo.nPos + (gcWheelDelta < 0) ?
LISTVIEW_SCROLL_ICON_LINE_SIZE :
-LISTVIEW_SCROLL_ICON_LINE_SIZE, 0);
break; break;
case LVS_REPORT: case LVS_REPORT:
if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines) if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines)
{ {
if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
{ cLineScroll *= (gcWheelDelta / WHEEL_DELTA);
int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines); LISTVIEW_VScroll(infoPtr, SB_INTERNAL, cLineScroll, 0);
cLineScroll *= (gcWheelDelta / WHEEL_DELTA);
LISTVIEW_VScroll(infoPtr, SB_THUMBPOSITION, scrollInfo.nPos + cLineScroll, 0);
}
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment