]> git.saurik.com Git - wxWidgets.git/commitdiff
fix vertical mouse wheel event rotation value, sign was reversed in r74805
authorPaul Cornett <paulcor@bullseye.com>
Fri, 20 Sep 2013 15:21:25 +0000 (15:21 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Fri, 20 Sep 2013 15:21:25 +0000 (15:21 +0000)
fixes #15524

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 1d2ab472d794d551552280fda4e2f3a83410c61b..e163078b989251a04f9295da18a772df2652b60b 100644 (file)
@@ -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;