Fix penpressure for tablets that use libinput on linux
This commit is contained in:
@@ -2231,6 +2231,7 @@ static BOOL is_stylus(const char *name, const char *type)
|
|||||||
"stylus",
|
"stylus",
|
||||||
"wizardpen",
|
"wizardpen",
|
||||||
"acecad",
|
"acecad",
|
||||||
|
"pen",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2286,7 +2287,8 @@ void GHOST_SystemX11::refreshXInputDevices()
|
|||||||
|
|
||||||
|
|
||||||
if ((m_xtablet.StylusDevice == NULL) &&
|
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");
|
// printf("\tfound stylus\n");
|
||||||
m_xtablet.StylusID = device_info[i].id;
|
m_xtablet.StylusID = device_info[i].id;
|
||||||
|
Reference in New Issue
Block a user