[OpenSmalltalk/opensmalltalk-vm] cce69c: Use precise scrolling deltas if available on OSX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] cce69c: Use precise scrolling deltas if available on OSX

Eliot Miranda-3
 
  Branch: refs/heads/fix_osx_linux_mouse_wheel
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: cce69c559d93e6fcc158ef64eb6e8030fbd4ce8f
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/cce69c559d93e6fcc158ef64eb6e8030fbd4ce8f
  Author: Nicolas Cellier <[hidden email]>
  Date:   2019-12-27 (Fri, 27 Dec 2019)

  Changed paths:
    M platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m

  Log Message:
  -----------
  Use precise scrolling deltas if available on OSX


  Commit: 92fa6f8a6d3688633ae142c1482918d9eeaec9bd
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/92fa6f8a6d3688633ae142c1482918d9eeaec9bd
  Author: Nicolas Cellier <[hidden email]>
  Date:   2019-12-27 (Fri, 27 Dec 2019)

  Changed paths:
    M platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m

  Log Message:
  -----------
  OSX: accumulate enough delta before sending the wheel event to the image


  Commit: 9d26c9785d6fce76c69095f51c57309c65afa6e1
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9d26c9785d6fce76c69095f51c57309c65afa6e1
  Author: Nicolas Cellier <[hidden email]>
  Date:   2019-12-27 (Fri, 27 Dec 2019)

  Changed paths:
    M platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m

  Log Message:
  -----------
  Convert OSX point units into scrolling units

Set the limit to 20 scrolling units to restrain the flow of events delivered to image
That's about 7 points (1/10 inch), not exactly the smoothest.
But if we want smoother scroll, we have to accelerate event handling at image side first.

The threshold might become a parameter, but for now YAGNI.

Note: the scrolling unit of 120 units per mouse wheel notch comes from moz.dev.
The fact that we convert a single notch to 3 lines is a Squeak convention
See https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/41


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/9e2b99c2172f...9d26c9785d6f