[OpenSmalltalk/opensmalltalk-vm] f219b7: Fix the sign of x wheel events in OSX to be inline...

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

[OpenSmalltalk/opensmalltalk-vm] f219b7: Fix the sign of x wheel events in OSX to be inline...

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

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

  Log Message:
  -----------
  Fix the sign of x wheel events in OSX to be inline with "natural scrolling" preference.

- The VM should generate positive deltaX for Left to Right trackpad motion
- The VM should generate positive deltaY for Bottom to Up trackpad motion

For historical reasons, if VM does not send mouse wheel events, but fake keyboard arrow events, then:

- The VM should generate a left arrow key for Left to Right trackpad motion
- The VM should generate a bottom arrow key for Bottom to Up trackpad motion

Not that the preferred direction preference of OSX is taken into account by the VM
See https://developer.apple.com/documentation/appkit/nsevent/1525151-isdirectioninvertedfromdevice
Above description is for "natural scrolling" preference (the trackpad does drag the screen contents).
It will be inverted if the preference is unset (the trackpad does drag the scroll bar).

Note that the `isFlipped` method of the Cocoa/Quartz view presumably ha an impact on sign of vertical motions
See https://developer.apple.com/documentation/appkit/nsview/1483532-isflipped
OpenSmalltalk VM does use isFlipped YES.