summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-11-12 19:38:50 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-11-12 20:25:17 +0100
commit019859d98079c0cf0c287e54d515b0ccb4004d52 (patch)
tree3a08fb597f82aac42f935ffb72a82647cf003baa /platform/x11
parenta70d48f3b7ff17ac18daa97b5da0c8d3347969fa (diff)
downloadmupdf-019859d98079c0cf0c287e54d515b0ccb4004d52.tar.xz
Fix 697783: Invert mouse wheel mapping in mupdf-win32.
A positive wParam value maps to button rotated forward, away from the user, which is equivalent to button 4 in X11.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/win_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c
index 3725051f..9afd2d06 100644
--- a/platform/x11/win_main.c
+++ b/platform/x11/win_main.c
@@ -1167,13 +1167,13 @@ viewproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOUSEWHEEL:
if ((signed short)HIWORD(wParam) <= 0)
{
- handlemouse(oldx, oldy, 4, 1);
- handlemouse(oldx, oldy, 4, -1);
+ handlemouse(oldx, oldy, 5, 1);
+ handlemouse(oldx, oldy, 5, -1);
}
else
{
- handlemouse(oldx, oldy, 5, 1);
- handlemouse(oldx, oldy, 5, -1);
+ handlemouse(oldx, oldy, 4, 1);
+ handlemouse(oldx, oldy, 4, -1);
}
return 0;