Fix T59564: Huion pen pressure not working on Linux, after recent changes.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 18 Dec 2018 13:30:00 +0000 (14:30 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 18 Dec 2018 14:07:04 +0000 (15:07 +0100)
intern/ghost/intern/GHOST_SystemX11.cpp

index ce056ef2c62e62b01d5989ea6a6d34a3db691513..e53379a4f22ccf63e9bae872cc854a2cbe8b5c32 100644 (file)
@@ -2356,10 +2356,7 @@ void GHOST_SystemX11::refreshXInputDevices()
 
                                GHOST_TTabletMode tablet_mode = tablet_mode_from_name(device_info[i].name, device_type);
 
-                               if ((m_xtablet.StylusDevice == NULL) &&
-                                   ((tablet_mode == GHOST_kTabletModeStylus) && (device_info[i].type != m_atom.TABLET)))
-                                   /* for libinput to work reliable, only lookup ValuatorClass in Tablet type:'STYLUS' */
-                               {
+                               if ((m_xtablet.StylusDevice == NULL) && (tablet_mode == GHOST_kTabletModeStylus)) {
 //                                     printf("\tfound stylus\n");
                                        m_xtablet.StylusID = device_info[i].id;
                                        m_xtablet.StylusDevice = XOpenDevice(m_display, m_xtablet.StylusID);
@@ -2386,7 +2383,7 @@ void GHOST_SystemX11::refreshXInputDevices()
                                                                        m_xtablet.YtiltLevels = 0;
                                                                }
 
-                                                               found_valuator_class = true;
+                                                               found_valuator_class = (m_xtablet.PressureLevels > 0);
 
                                                                break;
                                                        }