xpra icon
Bug tracker and wiki

Opened 15 months ago

Last modified 4 days ago

#1157 new enhancement

Wacom Tablet OSX Support

Reported by: maxmylyn Owned by: alas
Priority: major Milestone: future
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 maxmylyn 14 months ago.
1157-GTK_info.txt (4.0 KB) - added by maxmylyn 13 months ago.
osx-wheel-events.patch (877 bytes) - added by Antoine Martin 4 months ago.
register a callback so we can receive raw wheel events

Download all attachments as: .zip

Change History (21)

comment:1 Changed 15 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn

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

comment:2 Changed 14 months ago by Antoine Martin

Milestone: 0.170.18

Too late for 0.17

comment:3 Changed 14 months ago by maxmylyn

Owner: changed from maxmylyn 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 14 months ago by maxmylyn

Attachment: 1157_mouse_debug.txt added

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

comment:5 Changed 14 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn
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 14 months ago by maxmylyn

Owner: changed from maxmylyn 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 14 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn

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 13 months ago by maxmylyn

Owner: changed from maxmylyn 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 13 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn

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 13 months ago by maxmylyn

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 13 months ago by maxmylyn

Owner: changed from maxmylyn 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 13 months ago by maxmylyn

Attachment: 1157-GTK_info.txt added

comment:12 Changed 12 months ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

comment:13 Changed 11 months ago by Antoine Martin

Milestone: 1.01.1
Status: newassigned

Out of time.

comment:14 Changed 10 months ago by Antoine Martin

Milestone: 1.12.0

Milestone renamed

Changed 4 months ago by Antoine Martin

Attachment: osx-wheel-events.patch added

register a callback so we can receive raw wheel events

comment:15 Changed 4 months ago by Antoine Martin

Owner: changed from Antoine Martin to maxmylyn
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 4 months ago by Antoine Martin (previous) (diff)

comment:16 Changed 4 months ago by maxmylyn

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 4 months ago by maxmylyn (previous) (diff)

comment:17 Changed 4 months ago by maxmylyn

Owner: changed from maxmylyn to alas

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

comment:18 Changed 4 days ago by maxmylyn

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.

Note: See TracTickets for help on using tickets.