xpra icon
Bug tracker and wiki

Opened 2 years ago

Last modified 2 months ago

#1157 new enhancement

Wacom Tablet OSX Support

Reported by: J. Max Mena Owned by: J. Max Mena
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 (4)

1157_mouse_debug.txt (504.1 KB) - added by J. Max Mena 2 years ago.
1157-GTK_info.txt (4.0 KB) - added by J. Max Mena 2 years ago.
osx-wheel-events.patch (877 bytes) - added by Antoine Martin 16 months ago.
register a callback so we can receive raw wheel events
1157wacomdmousescroll.txt (592.3 KB) - added by J. Max Mena 5 months ago.
At long last the logs.

Download all attachments as: .zip

Change History (39)

comment:1 Changed 2 years 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 2 years ago by Antoine Martin

Milestone: 0.170.18

Too late for 0.17

comment:3 Changed 2 years 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 2 years ago by J. Max Mena

Attachment: 1157_mouse_debug.txt added

comment:4 Changed 2 years 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 2 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years ago by J. Max Mena

Attachment: 1157-GTK_info.txt added

comment:12 Changed 2 years ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

comment:13 Changed 23 months ago by Antoine Martin

Milestone: 1.01.1
Status: newassigned

Out of time.

comment:14 Changed 22 months ago by Antoine Martin

Milestone: 1.12.0

Milestone renamed

Changed 16 months ago by Antoine Martin

Attachment: osx-wheel-events.patch added

register a callback so we can receive raw wheel events

comment:15 Changed 16 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 16 months ago by Antoine Martin (previous) (diff)

comment:16 Changed 16 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 16 months ago by J. Max Mena (previous) (diff)

comment:17 Changed 16 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 12 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 11 months ago by Antoine Martin

Milestone: future2.2

ping - do I have to go and buy one?

comment:20 Changed 11 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 11 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 11 months 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 11 months 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 11 months 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?

comment:25 Changed 7 months ago by Antoine Martin

See also #1695

comment:26 Changed 5 months ago by J. Max Mena

Owner: changed from alas to J. Max Mena
Status: newassigned

Taking this ticket as I'm the one with the Wacom tablet.

Changed 5 months ago by J. Max Mena

Attachment: 1157wacomdmousescroll.txt added

At long last the logs.

comment:27 Changed 5 months ago by J. Max Mena

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

Okay, I launched the r18037.dmg beta client against a Fedora trunk r18058 server.

My steps were pretty simple:

  • Attach with the Wacom tablet connected and enabled
  • Move the mouse a bit
  • clicked with both left click (tapping the stylus to the tablet) and right click (button on the stylus)
  • Scrolled a bit up and down, and left and right (button on the tablet)

For reference, the only applications I was forwarding was just a couple Xterm windows. This poor Mac Mini probably couldn't handle a lot more.

comment:28 Changed 5 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

From comment:3 :

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.

So the most important thing here is: does the wheel motion now respond as it should or is it sill too sensitive?
That's not something I can tell from the logs alone. (and you're not going to be able to figure that out with an xterm)

For what it's worth, the wacom tablet does not come through as a "precise" input device:

send_wheel_delta(1, 6, -1.2555, (0,)) precise wheel=False, modifiers=['mod2'], pointer=(1702, 218)

Maybe the "magic mouse" that afarr is referring to in comment:21 does?

In this wacom tablet case, we normalize the scroll values as a regular pointer device, there are about 3 or 4 dozen scroll events within about one second or so, which seems a bit fast - but I have no way of telling if that corresponds to what you intended or not.

comment:29 Changed 5 months ago by J. Max Mena

I meant to comment on this yesterday but never got around to it. The horizontal scrolling is backwards - moving the pen to the left scrolls to the left (when it should be the opposite). But, the scrolling feels usable - it isn't wildly oversensitive and feels in line with my mouse.

I'd try to get you some more logs but my client is refusing to connect today.

comment:30 Changed 5 months ago by Antoine Martin

The horizontal scrolling is backwards - moving the pen to the left scrolls to the left (when it should be the opposite).

That sounds like a bug, but just to be sure: is this an Apple thing or is this true on all platforms? (because the vertical scrolling is already different on macos... because different)
In any case, r18137 will now reverse the horizontal scrolling direction on macos only. Can be changed with: XPRA_REVERSE_HORIZONTAL_SCROLLING=0 (or 1 to enable - this env var applies to all platforms)
Do we have the same problem with the html5 client?

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

comment:31 Changed 5 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

First things first - there's no new OSX or Windows builds - so I wasn't able to get new versions of those.

I checked the HTML5 client (Chrome OSX/Win) - in Windows pan and scroll seem to do nothing at all. OSX behaves the same as I reported in comment:29 - vertical scroll is fine, but the horizontal scroll is reversed.

However, using the r17881 Windows Python Client, I noticed that horizontal scrolling doesn't work at all. Vertical scrolling works fine (and is consistent with Windows applications), however.

Somewhat related, but I plugged the tablet into my Fedora box, and while the pen works out of the box(yay, Linux), I can't seem to get scroll to work at all even with native applications. Fedora (or maybe just KDE) seems to want to treat all the buttons as mouse buttons, unfortunately.

comment:32 Changed 5 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

First things first - there's no new OSX or Windows builds - so I wasn't able to get new versions of those.

There are now. There were newer python3 / GTK3 builds for macos, but the the wheel handler code hasn't been ported to GTK3.

I checked the HTML5 client (Chrome OSX/Win) - in Windows pan and scroll seem to do nothing at all. OSX behaves the same as I reported in comment:29 - vertical scroll is fine, but the horizontal scroll is reversed.

Is it also reversed in the HTML5 client on macos?

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

comment:33 Changed 3 months ago by Antoine Martin

See also #1615

comment:34 Changed 2 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Finally got around to testing this - in the HTML5 client (Chrome and Firefox, it's horizontally reversed in MacOS. I can't test the Python client because it refuses to connect and prints this traceback (r18852):

/Users/max/Desktop/xpradists/r18852/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/osx_tray.py:86: Warning: invalid cast from 'GtkMenuBar' to 'GtkWindow'
  self.macapp.set_menu_bar(self.menu)
/Users/max/Desktop/xpradists/r18852/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/osx_tray.py:86: GtkWarning: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
  self.macapp.set_menu_bar(self.menu)

comment:35 Changed 2 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

I can't test the Python client because it refuses to connect and prints this traceback...

This is not a traceback.
These two harmless warnings have been present for a very long time.
Whatever the problem is, it isn't related to that.

Note: See TracTickets for help on using tickets.