From: Pekka Paalanen Date: Tue, 31 Jul 2012 10:21:07 +0000 (+0300) Subject: evdev: query position ranges for MT, too X-Git-Tag: 0.1.0~163^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=701024fd909a24e5ee779769f0b2d1d124ee71cd;p=platform%2Fupstream%2Flibinput.git evdev: query position ranges for MT, too For a true multi-touch input device, the code ended up using uninitialised fields of evdev_input_device::abs. Fix it by querying the corresponding MT ranges. Signed-off-by: Pekka Paalanen --- diff --git a/src/evdev.c b/src/evdev.c index 62f1bc1f..c294a3ae 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -400,6 +400,14 @@ evdev_configure_device(struct evdev_input_device *device) device->caps |= EVDEV_MOTION_ABS; } if (TEST_BIT(abs_bits, ABS_MT_SLOT)) { + ioctl(device->fd, EVIOCGABS(ABS_MT_POSITION_X), + &absinfo); + device->abs.min_x = absinfo.minimum; + device->abs.max_x = absinfo.maximum; + ioctl(device->fd, EVIOCGABS(ABS_MT_POSITION_Y), + &absinfo); + device->abs.min_y = absinfo.minimum; + device->abs.max_y = absinfo.maximum; device->is_mt = 1; device->mt.slot = 0; device->caps |= EVDEV_TOUCH;