summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-20 20:01:13 +0000
committerTor Lillqvist <tml@collabora.com>2018-01-29 09:02:48 +0100
commitfd25b9752a4ba2d0898d261fe6092d5f6ffbde20 (patch)
tree33d4697f70ae661b5978e491c919d398e63f0ab1
parent7984347b9a2fce74cdce0c1c5b27f6e2b55a2f49 (diff)
tdf#109062 restore osx scrollwheel logic
to pre commit f7d2bf216afa10268e6a7c1d4613a2fd8f7c7f3c Date: Tue May 16 10:12:09 2017 +0100 Resolves: tdf#103174 & rhbz#1367846 improve gtk3 trackpad scrolling state. Change-Id: If5a494441731e73136158b4905c2744ba8bc8875 Reviewed-on: https://gerrit.libreoffice.org/48305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--vcl/osx/salframeview.mm21
1 files changed, 12 insertions, 9 deletions
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index c79244a0011e..a4fc182858b1 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -816,9 +816,10 @@ private:
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = FALSE;
- aEvent.mnScrollLines = nDeltaZ;
- if( aEvent.mnScrollLines == 0 )
- aEvent.mnScrollLines = 1;
+ sal_uInt32 nScrollLines = nDeltaZ;
+ if (nScrollLines == 0)
+ nScrollLines = 1;
+ aEvent.mnScrollLines = nScrollLines;
mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
}
}
@@ -938,9 +939,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = TRUE;
- aEvent.mnScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
- if( aEvent.mnScrollLines == 0 )
- aEvent.mnScrollLines = 1;
+ sal_uInt32 nScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
+ if (nScrollLines == 0)
+ nScrollLines = 1;
+ aEvent.mnScrollLines = nScrollLines;
mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
}
@@ -951,9 +953,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = FALSE;
- aEvent.mnScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
- if( aEvent.mnScrollLines == 0 )
- aEvent.mnScrollLines = 1;
+ sal_uInt32 nScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
+ if (nScrollLines == 0)
+ nScrollLines = 1;
+ aEvent.mnScrollLines = nScrollLines;
mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
}