From 171db6d6cb76ec7afddb2f8e4a876c6c65ab865d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 28 Mar 2012 22:39:48 +0200 Subject: [PATCH] Discarded uninteresting scroll events. --- src/cocoa_window.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 5d8c00d4..9e64b2d3 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -479,7 +479,11 @@ static int convertMacKeyCode(unsigned int macKeyCode) - (void)scrollWheel:(NSEvent *)event { - _glfwInputScroll(window, [event deltaX], [event deltaY]); + double deltaX = [event deltaX]; + double deltaY = [event deltaY]; + + if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0) + _glfwInputScroll(window, deltaX, deltaY); } @end