Fix penpressure for tablets that use libinput on linux

This commit is contained in:
jens verwiebe 2018-11-24 18:23:57 +01:00
parent 874f12480f
commit e5bc9fae54
Notes: blender-bot 2023-02-14 05:59:31 +01:00
Referenced by issue #59645, The recent changes broke the pressure and tilt of the tablet pen
Referenced by issue #58030, XP-PEN Deco 01 pressure sensitivity not working
1 changed files with 3 additions and 1 deletions

View 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;