From ac687ddffb6f199603abc2415f7bcf0d051f1eca Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 20 Sep 2013 15:21:25 +0000 Subject: [PATCH] fix vertical mouse wheel event rotation value, sign was reversed in r74805 fixes #15524 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 1d2ab472d7..e163078b98 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1653,7 +1653,7 @@ window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win) if (gdk_event->delta_y) { event.m_wheelAxis = wxMOUSE_WHEEL_VERTICAL; - event.m_wheelRotation = int(event.m_wheelDelta * gdk_event->delta_y); + event.m_wheelRotation = int(event.m_wheelDelta * -gdk_event->delta_y); GtkRange* range = win->m_scrollBar[wxWindow::ScrollDir_Vert]; event.m_linesPerAction = GetWheelScrollActionDelta(range); event.m_columnsPerAction = event.m_linesPerAction; @@ -1680,7 +1680,7 @@ window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win) } event.m_wheelRotation = event.m_wheelDelta; - if (gdk_event->direction == GDK_SCROLL_UP || + if (gdk_event->direction == GDK_SCROLL_DOWN || gdk_event->direction == GDK_SCROLL_LEFT) { event.m_wheelRotation = -event.m_wheelRotation; -- 2.45.2