From 30c959a4534bc0c6b4718ae65fd4f91d68d6eca6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 2 Dec 2011 07:54:41 +0100 Subject: NEWT EVENT_MOUSE_WHEEL_MOVED: Fix Bug 413 - Generate proper mouse wheel events. > 0: UP < 0: DOWN See MouseEvent.getWheelRotation() for details. OSX/Windows: Default to wheel 'button' 1 OSX: Properly report '<0' X11: Synthesize wheel events by mapping buttons 4/5 and 6/7 to wheel 1 and 2. --- src/newt/native/WindowsWindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newt/native/WindowsWindow.c') diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index b654fbe85..9b97895c6 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -953,7 +953,7 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, (jint) EVENT_MOUSE_WHEEL_MOVED, GetModifiers(), (jint) eventPt.x, (jint) eventPt.y, - (jint) 0, (jint) (GET_WHEEL_DELTA_WPARAM(wParam)/120.0f)); + (jint) 1, (jint) (GET_WHEEL_DELTA_WPARAM(wParam)/120.0f)); useDefWindowProc = 1; break; } -- cgit v1.2.3