mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Report the correct number of touches for MT protocol B devices
Protocol B devices report the number of touches by giving a maximum and
minimum slot value. The current code ignores the minimum value, which is
usually 0, and underreports the number of touches by 1.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9ce068e760)
This commit is contained in:
committed by
Peter Hutterer
parent
833fc517d7
commit
7749159241
@@ -1384,7 +1384,8 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
|
||||
XIDependentTouch : XIDirectTouch;
|
||||
|
||||
if (pEvdev->mtdev->caps.slot.maximum > 0)
|
||||
num_touches = pEvdev->mtdev->caps.slot.maximum;
|
||||
num_touches = pEvdev->mtdev->caps.slot.maximum -
|
||||
pEvdev->mtdev->caps.slot.minimum + 1;
|
||||
|
||||
if (!InitTouchClassDeviceStruct(device, num_touches, mode,
|
||||
num_mt_axes_total)) {
|
||||
|
||||
Reference in New Issue
Block a user