[gnome-control-center/rhel/8.4.0: 25/32] wacom: ignore the wacom driver's touch tool type




commit 0d3213df4a2d036fed241086f1fb4b92b7645f76
Author: Peter Hutterer <peter hutterer who-t net>
Date:   Fri Dec 14 16:14:30 2018 +1000

    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.

 panels/wacom/cc-wacom-panel.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index 874887691..985ddf58e 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -374,9 +374,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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]