Fix penpressure for tablets that use libinput on linux
authorJens Verwiebe <info@jensverwiebe.de>
Sat, 24 Nov 2018 17:23:57 +0000 (18:23 +0100)
committerJens Verwiebe <info@jensverwiebe.de>
Sat, 24 Nov 2018 17:26:20 +0000 (18:26 +0100)
intern/ghost/intern/GHOST_SystemX11.cpp

index c8984f0e280568ac01fdf758f7bd32db341ffc94..06754bc9300610404a4b5e792d11fceb6e68a091 100644 (file)
@@ -2231,6 +2231,7 @@ static BOOL is_stylus(const char *name, const char *type)
                "stylus",
                "wizardpen",
                "acecad",
+               "pen",
                NULL
        };
 
@@ -2286,7 +2287,8 @@ void GHOST_SystemX11::refreshXInputDevices()
 
 
                                if ((m_xtablet.StylusDevice == NULL) &&
-                                   (is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET)))
+                                   (is_stylus(device_info[i].name, device_type) && (device_info[i].type != m_atom.TABLET)))
+                                   /* for libinput to work reliable, only lookup ValuatorClass in Tablet type:'STYLUS' */
                                {
 //                                     printf("\tfound stylus\n");
                                        m_xtablet.StylusID = device_info[i].id;