xpra icon
Bug tracker and wiki

Opened 18 months ago

Last modified 7 weeks ago

#1157 new enhancement

Wacom Tablet OSX Support

Reported by: J. Max Mena Owned by: alas
Priority: major Milestone: 2.2
Component: client Version: trunk
Keywords: Cc:

Description

As per Antoine's request in #1131, this ticket is for Wacom tablet support in OSX. As of now, Wacom tablets are mostly working in Windows, but OSX support hasn't begun yet.

Attachments (3)

1157_mouse_debug.txt (504.1 KB) - added by J. Max Mena 17 months ago.
1157-GTK_info.txt (4.0 KB) - added by J. Max Mena 16 months ago.
osx-wheel-events.patch (877 bytes) - added by Antoine Martin 7 months ago.
register a callback so we can receive raw wheel events

Download all attachments as: .zip

Change History (27)

comment:1 Changed 18 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Please include the debug output.
Do you get any events at all on OSX?

comment:2 Changed 17 months ago by Antoine Martin

Milestone: 0.170.18

Too late for 0.17

comment:3 Changed 17 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin
  • Surprisingly the tablet works perfectly fine for everything except scrolling.
  • Scrolling is way too sensitive. Scrolling in a small circle causes huge scrolls on the server.
    • Of note: Horizontal scrolling works!

I'll attach a debug log of me scrolling in a small circle.

Changed 17 months ago by J. Max Mena

Attachment: 1157_mouse_debug.txt added

comment:4 Changed 16 months ago by Antoine Martin

Status: newassigned

Looks like we need to do the same thing we did for win32 in ticket:1131#comment:11.
We need to trap the osx scroll events before they reach GTK and handle them properly ourselves.

Links:

Related:

Looks like the html5 client might suffer from the same bug:

Maybe this should be done after #173?

Last edited 16 months ago by Antoine Martin (previous) (diff)

comment:5 Changed 16 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena
Status: assignednew

@maxmylyn: please post the osx device info as per ticket:1131#comment:1, so we can see if GTK2 is even aware of the multiple devices connected.

comment:6 Changed 16 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

The GTK_info helper does not run in OSX. I get the following traceback:

TestBotMkV:Helpers maint$ ./GTK_info 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name main

And, to be honest, I have no idea how to even begin to fix it or work around it.

comment:7 Changed 16 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Sorry about that.
Fixes in trunk for the GTK_info and the webcam script in r12579 + r12580 + r12581 + r12582.
Backport to v0.17.x in r12584, r12585.

New beta uploaded.

comment:8 Changed 16 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Downloaded the r12587 beta:

  • Same error. Although, the other scripts seem to work (except the Webcam one says it can't import show_webcam)

comment:9 Changed 16 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Hmmm. Tried with the latest builds (both 0.18.0 and 0.17.3 betas), and I could not reproduce.
Tried with the beta r12587, and I still cannot reproduce: the webcam one does error out (but only with a missing "cv2" error, as expected since current builds do not support it on osx), the gtk info does work fine.
Maybe you had leftovers from another build?

comment:10 Changed 16 months ago by J. Max Mena

Honestly, I'm not sure what to say. I double checked that I was in the correct .app, and I'm still getting the same errors as before. Maybe that machine is haunted or something.

comment:11 Changed 16 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Yeah, it was that machine.

Used a different one, and now it actually gave an output without crashing.

I'll attach it to this ticket.

Handing back to you.

Changed 16 months ago by J. Max Mena

Attachment: 1157-GTK_info.txt added

comment:12 Changed 14 months ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

comment:13 Changed 14 months ago by Antoine Martin

Milestone: 1.01.1
Status: newassigned

Out of time.

comment:14 Changed 13 months ago by Antoine Martin

Milestone: 1.12.0

Milestone renamed

Changed 7 months ago by Antoine Martin

Attachment: osx-wheel-events.patch added

register a callback so we can receive raw wheel events

comment:15 Changed 7 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena
Status: assignednew

Why this took so long when the patch looked so promising? Well, it only catches global events, for our own window we should be using addLocalMonitorForEventsMatchingMask. But this one doesn't work - for whatever reason.
So then I thought we could use gdk.Window.add_fitler, but this one only gives us an empty gdk event structure and not the raw nsevent which contains the data we need.
Onto implementing this in Cython, which proved so difficult to interface with the nested union structure defined in objective-c that I almost gave up. (used glue objective-c files instead)


So, r15098 does this the long winded way using Cython.
We now accumulate scroll event deltas before sending them.
This also changes how scroll acceleration works: GTK would send a single event no matter what the value was for the delta... (hence the original problem).
We smooth things a bit using a square root function to prevent floods.
The details can be seen with "-d scroll" from the client.
New OSX beta uploaded.

PS: we should probably reset the delta values when the window loses focus, meh.

Last edited 7 months ago by Antoine Martin (previous) (diff)

comment:16 Changed 7 months ago by J. Max Mena

I'll see if I can get to this tomorrow afternoon. I honestly have no idea where our Wacom tablet ended up, but I'm 100% sure it isn't where I am.

Last edited 7 months ago by J. Max Mena (previous) (diff)

comment:17 Changed 6 months ago by J. Max Mena

Owner: changed from J. Max Mena to alas

Reassigning to the person who actually knows how to find the Wacom tablet at this current time.

comment:18 Changed 3 months ago by J. Max Mena

Milestone: 2.0future

Assigning this to a more realistic date. Afarr will be back next week, but there's no guarantee he can do the Wacom testing anytime soon.

comment:19 Changed 2 months ago by Antoine Martin

Milestone: future2.2

ping - do I have to go and buy one?

comment:20 Changed 2 months ago by alas

I have one within arm's reach.
I'll try to carve out some time to test in the coming week.
If I fail... well.

comment:21 Changed 2 months ago by alas

Owner: changed from alas to Antoine Martin

Made a few minutes to test (and several more to get the feel of using this tablet).
2.1 r16446 osx client on 10.12 and 2.1 r16498 server on fedora 25.

Feels like the scrolling with the pen is still extremely fast. Installed a mouse with a scrolling wheel for comparison and it was definitely very much slower (and easier to control) than the wacom pen. Just to really torture myself, I also installed a magic mouse and tried with that... which was perhaps even more uncontrollably fast (almost impossible to not scroll the entirety of a page with a two-finger swipe).

From the above comment, I"m going to assume that some -d scroll logs will be of use.

With an old-timey scroll wheel mouse (a couple of 'clicks' of scrolling).

 2017-07-24 17:46:02,580 wheel_event_handler(140235539967232, 0.0, 0.100006103515625) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,580 send_button(4, 0.100006) steps=1
2017-07-24 17:46:02,628 wheel_event_handler(140235539967232, 0.0, 0.693115234375) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,628 send_button(4, 0.693115) steps=2
2017-07-24 17:46:02,652 wheel_event_handler(140235539967232, 0.0, 2.9940185546875) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,652 send_button(4, 2.994019) steps=5
2017-07-24 17:46:02,676 wheel_event_handler(140235539967232, 0.0, 4.726776123046875) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,676 send_button(4, 4.726776) steps=6
2017-07-24 17:46:02,692 wheel_event_handler(140235539967232, 0.0, 5.9018096923828125) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,692 send_button(4, 5.901810) steps=7
2017-07-24 17:46:02,724 wheel_event_handler(140235539967232, 0.0, 6.4631195068359375) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,724 send_button(4, 6.463120) steps=8
2017-07-24 17:46:02,764 wheel_event_handler(140235539967232, 0.0, 6.89666748046875) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1350, 805), GBRP))
2017-07-24 17:46:02,765 send_button(4, 6.896667) steps=8

Trying to do something (clumsily) similar with the wacom pen (tap on window for focus, click the button set to engage scrolling, scroll for a fraction of a second).

2017-07-24 18:00:23,454 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,454 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,615 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,615 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,631 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,631 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,638 wheel_event_handler(140235539967232, -1.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,638 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,639 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,653 wheel_event_handler(140235539967232, -2.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,653 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,654 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,662 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,663 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,663 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,676 wheel_event_handler(140235539967232, -3.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,676 send_button(6, -3.000000) steps=5
2017-07-24 18:00:23,677 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,684 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,684 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,685 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,692 wheel_event_handler(140235539967232, -2.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,692 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,693 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,700 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,700 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,701 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,707 wheel_event_handler(140235539967232, -2.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,707 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,708 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,715 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,715 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,716 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,723 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,723 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,730 wheel_event_handler(140235539967232, 0.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,730 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,746 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,747 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,747 send_button(4, 1.000000) steps=3
2017-07-24 18:00:23,752 wheel_event_handler(140235539967232, 0.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,753 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,769 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,769 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,770 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,784 wheel_event_handler(140235539967232, -2.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,784 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,785 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,799 wheel_event_handler(140235539967232, -3.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,799 send_button(6, -3.000000) steps=5
2017-07-24 18:00:23,800 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,807 wheel_event_handler(140235539967232, -2.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,807 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,807 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,815 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,815 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,816 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,830 wheel_event_handler(140235539967232, -3.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,831 send_button(6, -3.000000) steps=5
2017-07-24 18:00:23,832 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,846 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,846 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,847 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,868 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,868 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,869 send_button(4, 1.000000) steps=3
2017-07-24 18:00:23,876 wheel_event_handler(140235539967232, 0.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,876 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,884 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,884 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,884 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,899 wheel_event_handler(140235539967232, -1.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,899 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,899 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,914 wheel_event_handler(140235539967232, -2.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,915 send_button(6, -2.000000) steps=4
2017-07-24 18:00:23,915 send_button(4, 3.000000) steps=5
2017-07-24 18:00:23,930 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,930 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,931 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,945 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,945 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,945 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,962 wheel_event_handler(140235539967232, 0.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,962 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,976 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,976 send_button(6, -1.000000) steps=3
2017-07-24 18:00:23,976 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,984 wheel_event_handler(140235539967232, 0.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,984 send_button(4, 2.000000) steps=4
2017-07-24 18:00:23,999 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:23,999 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,000 send_button(4, 1.000000) steps=3
2017-07-24 18:00:24,007 wheel_event_handler(140235539967232, -1.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,007 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,008 send_button(4, 3.000000) steps=5
2017-07-24 18:00:24,014 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,014 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,015 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,030 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,031 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,031 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,045 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,045 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,046 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,060 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,060 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,060 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,076 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,076 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,076 send_button(4, 1.000000) steps=3
2017-07-24 18:00:24,083 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,083 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,084 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,099 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,099 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,100 send_button(4, 1.000000) steps=3
2017-07-24 18:00:24,106 wheel_event_handler(140235539967232, -1.0, 3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,106 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,106 send_button(4, 3.000000) steps=5
2017-07-24 18:00:24,129 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,130 send_button(6, -1.000000) steps=3
2017-07-24 18:00:24,130 send_button(4, 2.000000) steps=4
2017-07-24 18:00:24,183 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,183 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,184 send_button(4, 1.000000) steps=3
2017-07-24 18:00:24,267 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,267 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,268 send_button(4, 1.000000) steps=3
2017-07-24 18:00:24,298 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,298 send_button(6, -2.000000) steps=4
2017-07-24 18:00:24,367 wheel_event_handler(140235539967232, -3.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,367 send_button(6, -3.000000) steps=5
2017-07-24 18:00:24,375 wheel_event_handler(140235539967232, -3.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,375 send_button(6, -3.000000) steps=5
2017-07-24 18:00:24,382 wheel_event_handler(140235539967232, -4.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,382 send_button(6, -4.000000) steps=6
2017-07-24 18:00:24,390 wheel_event_handler(140235539967232, -4.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,390 send_button(6, -4.000000) steps=6
2017-07-24 18:00:24,398 wheel_event_handler(140235539967232, -3.0, -6.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:00:24,398 send_button(6, -3.000000) steps=5
2017-07-24 18:00:24,400 send_button(5, -6.000000) steps=7

There seems to be a 'pause' (700 ms?) between the initial scrolling 'action' and the session's response... and that may be part of why it seems like the motion is so fast/jerky initially. Continuing the try to use the pen for a 'long couple of seconds' however, I start to get some control, and am able to scroll up and down a bit without it going all the way from top to bottom of the page with each motion (on a browser nearly full height of a 4K display).

These are the logs from a point in time when I managed to get some control of the scrolling.

2017-07-24 18:03:12,296 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,297 send_button(7, 1.000000) steps=3
2017-07-24 18:03:12,297 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,335 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,336 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,383 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,384 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,404 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,405 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,419 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,420 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,434 wheel_event_handler(140235539967232, 2.0, -3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,435 send_button(7, 2.000000) steps=4
2017-07-24 18:03:12,435 send_button(5, -3.000000) steps=5
2017-07-24 18:03:12,450 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,451 send_button(7, 1.000000) steps=3
2017-07-24 18:03:12,451 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,504 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,505 send_button(7, 1.000000) steps=3
2017-07-24 18:03:12,505 send_button(5, -2.000000) steps=4
2017-07-24 18:03:12,619 wheel_event_handler(140235539967232, -2.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,620 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,620 send_button(5, -1.000000) steps=3
2017-07-24 18:03:12,682 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,682 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,695 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,696 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,712 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,712 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,736 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,736 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,788 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,788 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,803 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,804 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,819 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,819 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,856 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,857 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,857 send_button(4, 1.000000) steps=3
2017-07-24 18:03:12,896 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,896 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,898 send_button(4, 1.000000) steps=3
2017-07-24 18:03:12,910 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,911 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,912 send_button(4, 1.000000) steps=3
2017-07-24 18:03:12,919 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,919 send_button(6, -1.000000) steps=3
2017-07-24 18:03:12,919 send_button(4, 2.000000) steps=4
2017-07-24 18:03:12,998 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:12,998 send_button(6, -2.000000) steps=4
2017-07-24 18:03:12,998 send_button(4, 1.000000) steps=3
2017-07-24 18:03:13,010 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,011 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,012 send_button(4, 1.000000) steps=3
2017-07-24 18:03:13,019 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,019 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,020 send_button(4, 1.000000) steps=3
2017-07-24 18:03:13,025 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,026 send_button(6, -1.000000) steps=3
2017-07-24 18:03:13,026 send_button(4, 2.000000) steps=4
2017-07-24 18:03:13,043 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,044 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,045 send_button(4, 1.000000) steps=3
2017-07-24 18:03:13,071 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,072 send_button(6, -1.000000) steps=3
2017-07-24 18:03:13,072 send_button(4, 2.000000) steps=4
2017-07-24 18:03:13,118 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,118 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,125 wheel_event_handler(140235539967232, -1.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,126 send_button(6, -1.000000) steps=3
2017-07-24 18:03:13,126 send_button(4, 2.000000) steps=4
2017-07-24 18:03:13,146 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,146 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,157 wheel_event_handler(140235539967232, -2.0, 1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,157 send_button(6, -2.000000) steps=4
2017-07-24 18:03:13,158 send_button(4, 1.000000) steps=3
2017-07-24 18:03:13,179 wheel_event_handler(140235539967232, 0.0, 2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:13,180 send_button(4, 2.000000) steps=4
2017-07-24 18:03:14,054 wheel_event_handler(140235539967232, -2.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,055 send_button(6, -2.000000) steps=4
2017-07-24 18:03:14,184 wheel_event_handler(140235539967232, -1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,185 send_button(6, -1.000000) steps=3
2017-07-24 18:03:14,185 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,231 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,231 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,261 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,262 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,307 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,308 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,506 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,507 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,529 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,529 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,545 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,546 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,568 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,569 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,638 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,639 send_button(7, 1.000000) steps=3
2017-07-24 18:03:14,640 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,661 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,662 send_button(7, 1.000000) steps=3
2017-07-24 18:03:14,664 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,758 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,759 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,824 wheel_event_handler(140235539967232, 1.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,824 send_button(7, 1.000000) steps=3
2017-07-24 18:03:14,825 send_button(5, -2.000000) steps=4
2017-07-24 18:03:14,864 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:14,864 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,036 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,037 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,225 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,226 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,259 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,259 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,297 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,298 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,321 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,321 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,338 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,339 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,374 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,374 send_button(5, -2.000000) steps=4
2017-07-24 18:03:15,435 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), GBRP))
2017-07-24 18:03:15,436 send_button(5, -2.000000) steps=4

...
And, then there's the crazy magic mouse, which I can't control enough to keep from going top to bottom or vice versa with every scrolling action attempt. Not sure if you want to address that here or elsewhere (or later), but here are some logs from that.

2017-07-24 18:01:24,019 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,019 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,030 wheel_event_handler(140235539967232, 0.0, -8.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,030 send_button(5, -8.000000) steps=8
2017-07-24 18:01:24,041 wheel_event_handler(140235539967232, 0.0, -7.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,041 send_button(5, -7.000000) steps=8
2017-07-24 18:01:24,053 wheel_event_handler(140235539967232, 0.0, -7.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,053 send_button(5, -7.000000) steps=8
2017-07-24 18:01:24,076 wheel_event_handler(140235539967232, 0.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,076 wheel_event_handler(140235539967232, 0.0, -5.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,076 send_button(5, -5.000000) steps=7
2017-07-24 18:01:24,083 wheel_event_handler(140235539967232, 0.0, -9.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,083 send_button(5, -9.000000) steps=9
2017-07-24 18:01:24,086 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,086 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,098 wheel_event_handler(140235539967232, 0.0, -14.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,098 send_button(5, -14.000000) steps=11
2017-07-24 18:01:24,109 wheel_event_handler(140235539967232, 0.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,117 wheel_event_handler(140235539967232, 0.0, -9.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,117 send_button(5, -9.000000) steps=9
2017-07-24 18:01:24,133 wheel_event_handler(140235539967232, 0.0, -8.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,134 send_button(5, -8.000000) steps=8
2017-07-24 18:01:24,150 wheel_event_handler(140235539967232, 0.0, -8.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,150 send_button(5, -8.000000) steps=8
2017-07-24 18:01:24,166 wheel_event_handler(140235539967232, 0.0, -8.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,167 send_button(5, -8.000000) steps=8
2017-07-24 18:01:24,182 wheel_event_handler(140235539967232, 0.0, -8.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,182 send_button(5, -8.000000) steps=8
2017-07-24 18:01:24,199 wheel_event_handler(140235539967232, 0.0, -7.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,199 send_button(5, -7.000000) steps=8
2017-07-24 18:01:24,217 wheel_event_handler(140235539967232, 0.0, -7.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,218 send_button(5, -7.000000) steps=8
2017-07-24 18:01:24,234 wheel_event_handler(140235539967232, 0.0, -7.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,234 send_button(5, -7.000000) steps=8
2017-07-24 18:01:24,250 wheel_event_handler(140235539967232, 0.0, -6.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,250 send_button(5, -6.000000) steps=7
2017-07-24 18:01:24,266 wheel_event_handler(140235539967232, 0.0, -6.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,266 send_button(5, -6.000000) steps=7
2017-07-24 18:01:24,282 wheel_event_handler(140235539967232, 0.0, -5.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,282 send_button(5, -5.000000) steps=7
2017-07-24 18:01:24,300 wheel_event_handler(140235539967232, 0.0, -5.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,301 send_button(5, -5.000000) steps=7
2017-07-24 18:01:24,315 wheel_event_handler(140235539967232, 0.0, -5.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,315 send_button(5, -5.000000) steps=7
2017-07-24 18:01:24,334 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,335 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,350 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,350 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,366 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,366 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,382 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,382 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,398 wheel_event_handler(140235539967232, 0.0, -4.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,398 send_button(5, -4.000000) steps=6
2017-07-24 18:01:24,417 wheel_event_handler(140235539967232, 0.0, -3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,418 send_button(5, -3.000000) steps=5
2017-07-24 18:01:24,433 wheel_event_handler(140235539967232, 0.0, -3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,433 send_button(5, -3.000000) steps=5
2017-07-24 18:01:24,450 wheel_event_handler(140235539967232, 0.0, -3.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,450 send_button(5, -3.000000) steps=5
2017-07-24 18:01:24,466 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,467 send_button(5, -2.000000) steps=4
2017-07-24 18:01:24,483 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,483 send_button(5, -2.000000) steps=4
2017-07-24 18:01:24,500 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,500 send_button(5, -2.000000) steps=4
2017-07-24 18:01:24,514 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,514 send_button(5, -2.000000) steps=4
2017-07-24 18:01:24,535 wheel_event_handler(140235539967232, 0.0, -2.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,535 send_button(5, -2.000000) steps=4
2017-07-24 18:01:24,549 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,550 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,568 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,568 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,583 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,583 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,600 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,600 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,617 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,618 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,633 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,634 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,667 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,667 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,683 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,683 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,719 wheel_event_handler(140235539967232, 0.0, -1.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))
2017-07-24 18:01:24,720 send_button(5, -1.000000) steps=3
2017-07-24 18:01:24,721 wheel_event_handler(140235539967232, 0.0, 0.0) window=GLClientWindow(2 : gtk2.GLWindowBacking(2, (1325, 1298), YUV420P))

As for the wacom, it does feel like it is still accelerating a bit 'too steeply' even once I'm able to get my clumsiness somewhat under control.

comment:22 Changed 8 weeks ago by emclain

There is a bug in r15098 preventing the y values from accumulating:

617 setattr(window, "deltax", dx)
618 setattr(window, "deltax", dy)

"deltax" on line 618 should be "deltay".

comment:23 Changed 8 weeks ago by Antoine Martin

@emclain: thanks! fixed in r16548

Sadly, I don't think that will make scrolling better... accumulating means it's going to move more, not less.

Maybe this can help: r16549 also allows the user to change the wheel multiplier using the environment variable XPRA_OSX_WHEEL_MULTIPLIER=VALUE (defaults to 10)

comment:24 Changed 7 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to alas

I don't know how I missed this before, but there's a hasPreciseScrollingDeltas property of NSEvent and we have to normalize the scroll values ourselves (WTF!).
I assume that the tablet and the magic mouse come through as "precise" events - we'll see it in the logs now as wheel_event_handler(address, deltax, deltay, precise) with -d scroll:

normalize_precision(5.800)=7.616 (multiplier=100)
send_button(4, 7.7542) steps=7
wheel_event_handler(0x7ff6b97b7460, 0.0000, 6.2004, False) window=GLClientWindow(1 : gtk2.GLWindowBacking(1, (1280, 896), YUV444P))

So r16563 tries to deal with this, all scroll deltas are first divided by 10.0, then:

  • regular scroll deltas are multiplied by XPRA_OSX_WHEEL_MULTIPLIER=100, so we generally end up with values like 1 or -1 (as the values come though as 0.1 / -0.1 minimum): one scroll event per click
  • "precise" scroll deltas multiplied by XPRA_OSX_WHEEL_PRECISE_MULTIPLIER=1, so we should generally end up with values in the 0.1 to 1.0 range (or -0.1 to -1.0) and they can accumulate a little bit before we fire a scroll click

All scroll deltas greater than 1 are also un-accelerated (taking the square root) because the macos API gives crazy acceleration on those scroll events.

Now I still don't have the hardware to test, but I believe that the precise events are much more likely to be within a reasonable range now. (and if they're too slow, you can increase XPRA_OSX_WHEEL_PRECISE_MULTIPLIER)
Maybe we need to also un-accelerate the "precise" scroll deltas? And maybe sqrt is not enough/too aggressive?

Note: See TracTickets for help on using tickets.