After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695701 - Support tablet pressure on MacOSX, GTK3 redux
Support tablet pressure on MacOSX, GTK3 redux
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Quartz
3.6.x
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Sabo
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-12 13:30 UTC by Daniel Sabo
Modified: 2018-04-15 00:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use doubles for the x,y mouse coordinates; however x_root, y_root are still stuck as ints (6.72 KB, patch)
2013-03-12 13:33 UTC, Daniel Sabo
none Details | Review
A rough but working draft of pressure support (17.62 KB, patch)
2013-03-12 13:34 UTC, Daniel Sabo
none Details | Review
Draft 2 of pressure support (17.54 KB, patch)
2013-04-16 01:14 UTC, Daniel Sabo
none Details | Review

Description Daniel Sabo 2013-03-12 13:30:31 UTC
The Quartz backend of GTK3 needs to support pressure sensitive input. This should include support for hotplug and multiple devices.
Comment 1 Daniel Sabo 2013-03-12 13:33:57 UTC
Created attachment 238686 [details] [review]
Use doubles for the x,y mouse coordinates; however  x_root, y_root are still stuck as ints
Comment 2 Daniel Sabo 2013-03-12 13:34:37 UTC
Created attachment 238687 [details] [review]
A rough but working draft of pressure support
Comment 3 Daniel Sabo 2013-04-16 01:14:42 UTC
Created attachment 241615 [details] [review]
Draft 2 of pressure support

Attach an updated version of the patch, which fixes several bugs from draft 1.
Comment 4 Daniel Sabo 2014-02-10 20:34:43 UTC
Since it's been many months and I still haven't had time to fix this I am going to stop claiming it's ASSIGNED. The last patch here sometimes does not detect that the device has changed, I believe this is because the tablet proximity events gets delivered to a native window and doesn't make it this far into the event processing.

I think the shortest path to getting something useable will be to use the generic devices like GTK2 does instead of trying to detect different pens.
Comment 5 Andrew Chadwick 2016-05-03 12:18:37 UTC
Downstream testing is happening in the MyPaint forums. I don't know the details, but it seems to be going well. Please can this patch be updated and merged as soon as possible?

https://community.mypaint.org/t/how-to-build-mypaint-on-mac-osx-without-macports/344/2
Comment 6 Emmanuele Bassi (:ebassi) 2016-05-03 12:46:31 UTC
(In reply to Andrew Chadwick from comment #5)
> Downstream testing is happening in the MyPaint forums. I don't know the
> details, but it seems to be going well. Please can this patch be updated and
> merged as soon as possible?

The patch needs to be:

 * updated to use the seat and tablet API instead of the old device one
 * fixed to use the appropriate GTK coding style

Then we can review it and, after testing, merge it.

The patch in attachment 241615 [details] [review] is definitely not ready for landing in master.
Comment 7 Matthias Clasen 2016-05-03 12:49:15 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #6)

> The patch in attachment 241615 [details] [review] [review] is definitely not ready
> for landing in master.

But, regardless: thanks a lot for providing and testing it! It is very much appreciated. I don't have an OS X system, so I am really relying on this kind of cooperation.
Comment 8 Carlos Garnacho 2016-05-03 14:23:43 UTC
Uhm, embarrassing that this went unreviewed for so long... Thanks Andrew for the ping, and Daniel for the patches.

One question about the platform? Do tablets in MacOSX "steal" the pointer cursor when drawing? If not, do those have a standalone visible cursor of their own?
Depending on the replies, I would suggest a different approach to supporting this in GTK3.

One thing is for sure, I think the code should be creating one GdkDevice with GdkDeviceType "slave" for every of those deviceID/uniqueIDs you see, and setting this specific slave device through gdk_event_set_source_device() in events.

The approach taken with gdk_quartz_device_core_set_active/unique() sounds too much like the old GTK2 days, where events from other devices would be selectively silenced if there's a tablet in proximity. Nowadays we prefer to represent the device hierarchy faithfully in GdkSeat/GdkDeviceManager and forward all events, so the upper layers can decide.
Comment 9 beelzy 2016-05-06 10:00:26 UTC
I don't know if I'll find time to work on this, and I don't have any expertise with OSX development or GTK, but I can tell you that tablets on OSX use the same cursor as the mouse.

Sorry I can't commit to this right now, and if I did have time, I'd have to spend it learning about Quartz and looking through the GDK code. But if someone else comes up with a patch, I'll gladly test it in the meantime.
Comment 10 Matthias Clasen 2018-02-10 04:57:52 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 11 Matthias Clasen 2018-04-15 00:05:26 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new