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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user