Wacom tablet tool switching (problem + FIX)
When drawing with a Wacom tablet (Bamboo 6x9), tool should auto-switch from calligraphy tool (when using the stylus tip) to eraser tool (when using the stylus eraser). But doesn't, in inkscape post 0.92.
Steps to reproduce:
Start inkscape v1.0+ with Wacom tablet, draw with stylus tip (the pointy end), draw with eraser end.
And yes, the "Preferences:Input/Output:Input Devices:switch tool based on tablet..." is checked, and has been checked all along. preferences.xml snippet: ...
Both act like a generic mouse, with no tool autoselected.
What should have happened?
Stylus should autoswitch between calligraphy tool and eraser tool.
Inkscape 1.1 (noticed since Inkscape v1.0, and intermediate versions) problem NOT present in Inkscape 0.92
On Fedora 33, but also noticed on Fedora 31, using standard distribution RPMs for Inkscape.
NOTE: Inkscape v1.0+ is linked against GTK3, Inkscape v0.92 is linked against GTK2 (confirmed with ldd command on binaries): this seems to be a "GTK3 vs GTK2" problem!
Bug tracked down to src/desktop-events.cpp "snoop_extended" routine not retrieving the correct pointer device for the Wacom pad. This routine has been unchanged from 0.92 to the current version, which indicates that it is probably the GTK2->GTK3 switch that triggered this.
Patch attached, most of which is "commented-out debug printouts". Compiles, and results in inkscape v1.1 on Fedora 33 doing the expected "tool switching" with wacom tablet.