diff options
author | David Robillard <d@drobilla.net> | 2014-01-17 21:56:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-17 21:56:37 +0000 |
commit | 12898ecf40723adb674bad95c10d1e8092794297 (patch) | |
tree | 131ca9eebaa3c488b7124db4831392872f25caf1 /pugl/pugl_osx.m | |
parent | cea41bcb9be36fdfe9d273133996e1622586f27b (diff) |
Add mouse position to PuglScrollFunc (apply #896).
Fix compilation of pugl_test.
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r-- | pugl/pugl_osx.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index a9bbd24..c318d91 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -273,8 +273,11 @@ getModifiers(PuglView* view, NSEvent* ev) - (void) scrollWheel:(NSEvent*)event { if (puglview->scrollFunc) { + NSPoint loc = [event locationInWindow]; puglview->mods = getModifiers(puglview, event); - puglview->scrollFunc(puglview, [event deltaX], [event deltaY]); + puglview->scrollFunc(puglview, + loc.x, puglview->height - loc.y, + [event deltaX], [event deltaY]); } [self updateTrackingAreas]; } |