aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_win.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-17 21:56:37 +0000
committerDavid Robillard <d@drobilla.net>2014-01-17 21:56:37 +0000
commit12898ecf40723adb674bad95c10d1e8092794297 (patch)
tree131ca9eebaa3c488b7124db4831392872f25caf1 /pugl/pugl_win.cpp
parentcea41bcb9be36fdfe9d273133996e1622586f27b (diff)
downloadpugl-12898ecf40723adb674bad95c10d1e8092794297.tar.gz
pugl-12898ecf40723adb674bad95c10d1e8092794297.tar.bz2
pugl-12898ecf40723adb674bad95c10d1e8092794297.zip
Add mouse position to PuglScrollFunc (apply #896).
Fix compilation of pugl_test.
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r--pugl/pugl_win.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index 780752b..c95a2d2 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -286,13 +286,15 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOUSEWHEEL:
if (view->scrollFunc) {
view->scrollFunc(
- view, 0, (int16_t)HIWORD(wParam) / (float)WHEEL_DELTA);
+ view, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
+ (int16_t)HIWORD(wParam) / (float)WHEEL_DELTA);
}
break;
case WM_MOUSEHWHEEL:
if (view->scrollFunc) {
view->scrollFunc(
- view, (int16_t)HIWORD(wParam) / float(WHEEL_DELTA), 0);
+ view, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
+ (int16_t)HIWORD(wParam) / float(WHEEL_DELTA), 0);
}
break;
case WM_KEYDOWN: