Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wacom Tablet OSX Support #1157

Closed
totaam opened this issue Apr 2, 2016 · 69 comments
Closed

Wacom Tablet OSX Support #1157

totaam opened this issue Apr 2, 2016 · 69 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Apr 2, 2016

Issue migrated from trac ticket # 1157

component: client | priority: major | resolution: worksforme

2016-04-02 00:45:22: maxmylyn created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Apr 2, 2016

2016-04-02 07:51:34: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Apr 2, 2016

2016-04-02 07:51:34: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Apr 15, 2016

2016-04-15 15:47:08: antoine commented


Too late for 0.17

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2016

2016-05-12 21:07:13: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2016

2016-05-12 21:07:13: maxmylyn commented


  • 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.

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2016

2016-05-12 21:07:29: maxmylyn uploaded file 1157_mouse_debug.txt (504.1 KiB)

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 07:03:47: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 07:03:47: antoine commented


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

Links:

  • GTK3 ticket: the change could be ported to GTK2? (fairly self contained) Some of the constants are 10.7 / 10.8 onwards only, so this would require #840 (or moving to a newer build system)
  • pynput mouse darwin

Related:

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

Maybe this should be done after #173?

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 07:05:32: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 07:05:32: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 07:05:32: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 19:11:26: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented May 13, 2016

2016-05-13 19:11:26: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented May 14, 2016

2016-05-14 08:09:30: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented May 14, 2016

2016-05-14 08:09:30: antoine commented


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 12584, 12585.

New beta uploaded.

@totaam
Copy link
Collaborator Author

totaam commented May 20, 2016

2016-05-20 17:24:55: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented May 20, 2016

2016-05-20 17:24:55: maxmylyn commented


Downloaded the r12587 beta:

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

@totaam
Copy link
Collaborator Author

totaam commented May 21, 2016

2016-05-21 12:35:13: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented May 21, 2016

2016-05-21 12:35:13: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented May 23, 2016

2016-05-23 17:50:06: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented May 23, 2016

2016-05-23 18:33:34: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented May 23, 2016

2016-05-23 18:33:34: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented May 23, 2016

2016-05-23 18:33:44: maxmylyn uploaded file 1157-GTK_info.txt (4.0 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:52:23: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Aug 10, 2016

2016-08-10 05:27:05: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Aug 10, 2016

2016-08-10 05:27:05: antoine commented


Out of time.

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2016

2016-08-21 10:55:50: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Feb 16, 2017

2017-02-16 18:44:39: antoine uploaded file osx-wheel-events.patch (0.9 KiB)

register a callback so we can receive raw wheel events

@totaam
Copy link
Collaborator Author

totaam commented Feb 17, 2017

2017-02-17 11:33:47: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Feb 17, 2017

2017-02-17 11:33:47: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jan 17, 2018

2018-01-17 18:08:07: maxmylyn changed owner from alas to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jan 17, 2018

2018-01-17 18:08:07: maxmylyn commented


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

@totaam
Copy link
Collaborator Author

totaam commented Jan 19, 2018

2018-01-19 19:27:56: maxmylyn uploaded file 1157wacomdmousescroll.txt (592.3 KiB)

At long last the logs.

@totaam
Copy link
Collaborator Author

totaam commented Jan 19, 2018

2018-01-19 19:30:19: maxmylyn changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jan 19, 2018

2018-01-19 19:30:19: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jan 19, 2018

2018-01-19 19:30:19: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 20, 2018

2018-01-20 05:20:38: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jan 20, 2018

2018-01-20 05:20:38: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 23, 2018

2018-01-23 18:50:32: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 24, 2018

2018-01-24 04:09:14: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Jan 25, 2018

2018-01-25 22:43:02: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jan 25, 2018

2018-01-25 22:43:02: maxmylyn commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 26, 2018

2018-01-26 02:59:41: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Jan 26, 2018

2018-01-26 02:59:41: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Apr 1, 2018

2018-04-01 06:51:43: antoine commented


See also #1615

@totaam
Copy link
Collaborator Author

totaam commented Apr 20, 2018

2018-04-20 21:08:29: maxmylyn changed owner from maxmylyn to antoine

@totaam
Copy link
Collaborator Author

totaam commented Apr 20, 2018

2018-04-20 21:08:29: maxmylyn commented


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](../commit/8c60c1a952acf0af28431554b1fa10cb2209a821)/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](../commit/8c60c1a952acf0af28431554b1fa10cb2209a821)/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)

@totaam
Copy link
Collaborator Author

totaam commented Apr 21, 2018

2018-04-21 04:18:47: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Apr 21, 2018

2018-04-21 04:18:47: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Feb 9, 2019

2019-02-09 03:41:19: antoine changed owner from maxmylyn to encodedEntropy

@totaam
Copy link
Collaborator Author

totaam commented Aug 1, 2019

2019-08-01 13:00:18: smo changed owner from encodedEntropy to smo

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2019

2019-12-12 08:07:41: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2019

2019-12-12 08:07:41: antoine set resolution to worksforme

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2019

2019-12-12 08:07:41: antoine commented


Not heard back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant