[PATCH evdev 2/3] Use helper function for counting slots

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 3 23:19:56 PDT 2013


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index a738cfa..209ea7e 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1455,8 +1455,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int want_scroll_axes)
                 num_touches = pEvdev->mtdev->caps.slot.maximum -
                               pEvdev->mtdev->caps.slot.minimum + 1;
         } else
-            num_touches = pEvdev->absinfo[ABS_MT_SLOT].maximum -
-                          pEvdev->absinfo[ABS_MT_SLOT].minimum + 1;
+            num_touches = num_slots(pEvdev);
 
         if (!InitTouchClassDeviceStruct(device, num_touches, mode,
                                         num_mt_axes_total)) {
-- 
1.8.3.1



More information about the xorg-devel mailing list