diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-12-14 16:14:30 +1000 |
---|---|---|
committer | Carlos Garnacho <mrgarnacho@gmail.com> | 2018-12-18 20:46:02 +0000 |
commit | def41bc0fed5207e2d1be078e0f7eb522f9e31e5 (patch) | |
tree | 86ac7aed31ccd146a2e2b634d7c309d4b40f3da5 /panels/wacom/cc-wacom-panel.c | |
parent | a82b975367e3733612062bd8a8075640ab5837f7 (diff) | |
download | gnome-control-center-def41bc0fed5207e2d1be078e0f7eb522f9e31e5.tar.gz |
wacom: ignore the wacom driver's touch tool type
When the wacom driver handles the touch device, we get a tool id of 0x3. Let's
ignore that because we don't need a tool for the touch node.
Ideally we should be able to rely on the GDK tool type but that one is always
GDK_DEVICE_TOOL_TYPE_UNKNOWN see
https://gitlab.gnome.org/GNOME/gtk/merge_requests/453
A GTK bug (also fixed in that MR) prevents the tool id from updating.
Until that GTK bug is fixed the pen will only be detected if it is the first
event from this physical device. If the touch node sends an event before the
pen, the pen won't be detected.
Diffstat (limited to 'panels/wacom/cc-wacom-panel.c')
-rw-r--r-- | panels/wacom/cc-wacom-panel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c index 51662c4dc..34cd11248 100644 --- a/panels/wacom/cc-wacom-panel.c +++ b/panels/wacom/cc-wacom-panel.c @@ -383,9 +383,14 @@ update_current_tool (CcWacomPanel *panel, * for eraser for devices that don't have a true HW id. * Reset those to 0 so we can use the same code-paths * libinput uses. + * The touch ID is 0x3, let's ignore that because we don't + * have a touch tool and it only happens when the wacom + * driver handles the touch device. */ if (id == 0x2 || id == 0xa) id = 0; + else if (id == 0x3) + return; stylus = cc_wacom_tool_new (serial, id, wacom_device); if (!stylus) |