From a5c127e32d64efdfe0cc6becfaa972292a5fa8e6 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 6 Apr 2004 16:15:21 +0000 Subject: [PATCH] #144018 r=pedemont, sr=blizzard (platform specific), a=mkaply OS/2 only - add an extra check for detecting scroll mouse vs. keyboard events git-svn-id: svn://10.0.0.236/trunk@154535 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/os2/nsWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/widget/src/os2/nsWindow.cpp b/mozilla/widget/src/os2/nsWindow.cpp index 3e79f6e16af..adb63daf179 100644 --- a/mozilla/widget/src/os2/nsWindow.cpp +++ b/mozilla/widget/src/os2/nsWindow.cpp @@ -2207,9 +2207,13 @@ PRBool nsWindow::OnKey( MPARAM mp1, MPARAM mp2) if (usVKey == VK_ALTGRAF || usVKey == VK_ALT) event.isAlt = PR_TRUE; } - if (((event.keyCode == NS_VK_UP) || (event.keyCode == NS_VK_DOWN)) && (!(fsFlags & KC_KEYUP))) { + /* Checking for a scroll mouse event vs. a keyboard event */ + /* The way we know this is that the repeat count is 0 and */ + /* the key is not physically down */ + if (((event.keyCode == NS_VK_UP) || (event.keyCode == NS_VK_DOWN)) && + (!(fsFlags & KC_KEYUP)) && + (CHAR3FROMMP(mp1) == 0)) { if (!(WinGetPhysKeyState(HWND_DESKTOP, CHAR4FROMMP(mp1)) & 0x8000)) { - /* This isn't a real keyboard event - assume it is a scroll mouse */ MPARAM mp2; if (event.keyCode == NS_VK_UP) mp2 = MPFROM2SHORT(0, SB_LINEUP);