Bug 364518 mouse wheel stopped working since Fx 2.0.0.1 r=ere, sr=roc, a=jay

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@218054 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
masayuki%d-toybox.com
2007-01-09 11:27:05 +00:00
parent 3069313603
commit 95c8dc0db9

View File

@@ -5671,11 +5671,13 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
scrollEvent.delta = 0;
if (isVertical) {
scrollEvent.scrollFlags = nsMouseScrollEvent::kIsVertical;
int verticalAmount =
msg == WM_MOUSEWHEEL ? (short) HIWORD (wParam) : (int) wParam;
if (ulScrollLines == WHEEL_PAGESCROLL) {
scrollEvent.scrollFlags |= nsMouseScrollEvent::kIsFullPage;
scrollEvent.delta = (((short) HIWORD (wParam)) > 0) ? -1 : 1;
scrollEvent.delta = verticalAmount > 0 ? -1 : 1;
} else {
currentVDelta -= (short) HIWORD (wParam);
currentVDelta -= verticalAmount;
if (PR_ABS(currentVDelta) >= iDeltaPerLine) {
scrollEvent.delta = currentVDelta / iDeltaPerLine;
currentVDelta %= iDeltaPerLine;