<div dir="ltr"><div>Hi Tom,</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 31 déc. 2019 à 08:26, Tom Beckmann <<a href="mailto:tomjonabc@gmail.com" target="_blank">tomjonabc@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div>Hi Nicolas,</div><div><br></div><div>on my ubuntu, running with the synaptics touchpad driver and "natural scrolling" enabled, I get the same default behavior as you describe. You can double check that this is the expected behavior by finding a page in your browser that overflows horizontally and checking whether it also moves right as your fingers move right. I typically mod the horizontal axis via `xinput set-prop` to get consistent behavior on both axes. The libinput driver (an alternative to synaptics that is used by default on wayland to my knowledge) appears to send negative to the bottom-right on both axes by default.</div><div>So, if your browser on linux behaves the same, you should likely just keep the signs unchanged and leave it to the user to make this behavior consistent/adapt it to their liking, as it is an OS preference.</div><div><br></div></div></blockquote><div>Yes, all applications react consistently to trackpad scrolling: they obey "natural scrolling": we are directly dragging the screen with the trackpad.<br></div><div>Except Squeak on MacOSX with my recent ScrollPane changes (inbox Morphic-nice.1613).</div><div>You can observe reversed horizontal scrolling in an explorer with (Smalltalk sendMouseWheelEvents: true) on OSX, but not Linux nor Windows...</div></div><div class="gmail_quote">I think that I should change the sign convention on OSX VM, but I'd like to understand why...<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">The VM should use consistent conventions across OS, and respect user preference for scrolling direction (scrollbar or natural feel).</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div>I am not able to find the sign convention of NSEvent scrollingDeltaX.</div><div><a href="https://developer.apple.com/documentation/appkit/nsevent/1534871-deltax" target="_blank">https://developer.apple.com/documentation/appkit/nsevent/1534871-deltax</a> tells that deltaX it is -1 for swipe right.</div><div>But I observe -xxx for scrollingDeltaX right to left...</div><div>I cannot make a mental picture of events management with this documentation, maybe I missed the right one...</div><div><br></div><div>User preference about direction can be queried here:</div><div><a href="https://developer.apple.com/documentation/appkit/nsevent/1525151-isdirectioninvertedfromdevice">https://developer.apple.com/documentation/appkit/nsevent/1525151-isdirectioninvertedfromdevice</a></div><div>It's seems that "natural scrolling" is indeed case of inverted, but wording is clear as mudwater.<br></div><div><br></div><div>Even for vertical scrolls, documentation is blurred.</div><div>Because Apple changed the orientation of y axis:</div><div>- it once was origin top-left, positive toward bottom (this is natural console oriented direction for latin text).</div><div>- it is now origin bottom-left, positive toward up (usual math conventions).</div><div>It's possible to change coordinate system on views, but then, does this change NSEvent?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>What you might also be interested in, I started integrating xinput2 into the OSVM: <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/Cog...tom95:xi-experiment" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/Cog...tom95:xi-experiment</a><br></div><div>This enables "pixel perfect" scrolling events and multitouch on linux. In the branch I took the liberty to define a new event type for touch events (ignoring the existing work for iOS that appeared to opt for a generic complex event type). It is still a work-in-progress, as xinput2 requires handling devicechanged events on the application side and some other things like modifier masks changed, which I haven't taken the time to look into yet. And of course, the design for touch events would need to be discussed to get the most future proof and cross-platform-compatible version.<br></div><div><br></div></div></blockquote><div>That's goodness!</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Best,</div><div>Tom<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 30, 2019 at 9:26 PM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div>Hi all,</div><div>there is still an issue with horizontal mouse wheels with latest VM, and (Smalltalk sendMouseWheelEvents: true)<br></div><div><br></div><div>When I sweep the trackpad from bottom to top (with two fingers on MacBook), I get  negative yDelta on the 3 OS, OSX, linux, Windows, all good.<br></div><div><br></div><div>When I sweep the trackpad from right to left (with two finders on Mac) , I get:</div><div>- negative xDelta on OSX</div><div>- positive xDelta on linux and Windows</div><div><br></div><div>I don't know whether it's due to Parallels VM, or same on native windows/linux... Could someone confirm?</div><div><br></div><div>If so, I don't know which sign to change, what would you expect?<br></div><div><br></div><div><br></div></div>
</blockquote></div>
</blockquote></div></div>