From 95c8dc0db9e32a7ef288c94143dcc0fe810e2a7a Mon Sep 17 00:00:00 2001 From: "masayuki%d-toybox.com" Date: Tue, 9 Jan 2007 11:27:05 +0000 Subject: [PATCH] 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 --- mozilla/widget/src/windows/nsWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/widget/src/windows/nsWindow.cpp b/mozilla/widget/src/windows/nsWindow.cpp index c1d55828dfe..c3a4bcebce3 100644 --- a/mozilla/widget/src/windows/nsWindow.cpp +++ b/mozilla/widget/src/windows/nsWindow.cpp @@ -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;