On Tue Jan 9 13:15:02 2024 +0000, Warren Togami wrote:
How does XWayland decide in this regard?
good question! Taking a peek at the wine and xwayland source code, I think what's happening is X11 wine is relying on the legacy feature where e.g., mouse button 4 is scroll up, mouse button 5 is scroll down, mouse button 6 is scroll left, mouse button 7 is scroll right. Xwayland looks at the smooth motion, and emulates those compat mouse button presses by taking the motion in pixel space and dividing by 10. It considers this to be normalized such that 1.0 is one scroll increment (emulated button press). So if the user two finger swipes the equivalent of 37 pixels, it considers that a scroll of 3.7, which is 3 button presses, and 0.7 stashed away in an accumulator to be added to the next swipe. In other words, it's pretending like there's an invisible scroll wheel without detents in the touchpad, and every time the scroll moves enough, it generates a click, and if it doesn't generate enough, the invisible wheel stays where the finger last put it.