summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-01-27 16:20:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-28 10:41:46 +0000
commitb083afac2f0531bacd790cb3ac25353f9a02db5d (patch)
treedb9191dd5781deeb4631ebb3f4038d0b9046c72d
parent237ebf91c17f8c20304ebd4f7cf8bd058bc6f7c7 (diff)
Resolves: rhbz#1294208 trackpad two finger scroll goes into reverse
(cherry picked from commit e734c7f53cfffa6141e6b46c06825ee273e2136b) Change-Id: Ic576f14cae82781a93e52972513a28c4a141d1a2
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index af284ca8c3aa..3914de59148f 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2557,14 +2557,12 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
{
case GDK_SCROLL_SMOOTH:
{
- double delta_x, delta_y;
- gdk_event_get_scroll_deltas(pEvent, &delta_x, &delta_y);
//pick the bigger one I guess
- aEvent.mbHorz = fabs(delta_x) > fabs(delta_y);
+ aEvent.mbHorz = fabs(pSEvent->delta_x) > fabs(pSEvent->delta_y);
if (aEvent.mbHorz)
- aEvent.mnDelta = -delta_x;
+ aEvent.mnDelta = -pSEvent->delta_x * 40;
else
- aEvent.mnDelta = -delta_y;
+ aEvent.mnDelta = -pSEvent->delta_y * 40;
aEvent.mnScrollLines = 1;
pThis->m_nLastScrollEventTime = pSEvent->time;
break;