diff options
author | Patrik Nyblom <[email protected]> | 2010-12-20 15:00:20 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-12-20 15:00:20 +0100 |
commit | ebf3c8cb93b96346fe359a61fd9c3f259448e5f3 (patch) | |
tree | ae900c48f3411d4977f208f6268e3bd68cfc4632 /erts/emulator/drivers | |
parent | 1e64afef9bc131d2ca5b8a43d2eb63bb7120dc80 (diff) | |
parent | 74ee7676df5720c1624d79e5cdb3d6fdf29c78f3 (diff) | |
download | otp-ebf3c8cb93b96346fe359a61fd9c3f259448e5f3.tar.gz otp-ebf3c8cb93b96346fe359a61fd9c3f259448e5f3.tar.bz2 otp-ebf3c8cb93b96346fe359a61fd9c3f259448e5f3.zip |
Merge branch 'pan/werl-scrollwheel/OTP-8985' into dev
* pan/werl-scrollwheel/OTP-8985:
Teach win_con.c about scroll wheels
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/win32/win_con.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/drivers/win32/win_con.c b/erts/emulator/drivers/win32/win_con.c index 2202ca655f..14f7941643 100644 --- a/erts/emulator/drivers/win32/win_con.c +++ b/erts/emulator/drivers/win32/win_con.c @@ -704,6 +704,18 @@ FrameWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) } write_inbuf(&c, 1); return 0; + case WM_MOUSEWHEEL: + { + int delta = GET_WHEEL_DELTA_WPARAM(wParam); + if (delta < 0) { + PostMessage(hClientWnd, WM_VSCROLL, MAKELONG(SB_THUMBTRACK, + (iVscrollPos + 5)),0); + } else { + WORD pos = ((iVscrollPos - 5) < 0) ? 0 : (iVscrollPos - 5); + PostMessage(hClientWnd, WM_VSCROLL, MAKELONG(SB_THUMBTRACK,pos),0); + } + return 0; + } case WM_CHAR: c = (TCHAR)wParam; write_inbuf(&c,1); |