Xinput: Avoid misdetecting certain trackballs as tablets

The algorithm triggers on the word "cursor" in the device name, which
would also happen for devices from the manufacturer Cursor Controls.

Task-number: QTBUG-48034
Change-Id: I9645c0d0bc1fa951d0ea00480572fd0df0220eb5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
Eirik Aavitsland 2017-10-26 13:26:56 +02:00 committed by Shawn Rutledge
parent d2b8a01ab0
commit e45ffd7bf6
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ void QXcbConnection::xi2SetupDevices()
isTablet = true;
tabletData.pointerType = QTabletEvent::Eraser;
dbgType = QLatin1String("eraser");
} else if (name.contains("cursor")) {
} else if (name.contains("cursor") && !(name.contains("cursor controls") && name.contains("trackball"))) {
isTablet = true;
tabletData.pointerType = QTabletEvent::Cursor;
dbgType = QLatin1String("cursor");