[PATCH weston 12/17] evdev: fix touch screen detection

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 5 03:33:09 PDT 2012


The touch screen of Samsung Galaxy Nexus has, according to evtest:

Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "Melfas MMSxxx Touchscreen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 3 (EV_ABS)
    Event code 47 (ABS_MT_SLOT)
      Value      1
      Min        0
      Max        9
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max       30
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max      720
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     1280
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max      255
Properties:
  Property type 1 (INPUT_PROP_DIRECT)

This device will hit the (has_abs && !has_key) condition, and therefore
gets ignored.

Fix this by checking also for multi-touch.

Thanks to Daniel Stone for suggesting this fix.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/evdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index d648c17..3379227 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -461,7 +461,7 @@ evdev_configure_device(struct evdev_input_device *device)
 	/* This rule tries to catch accelerometer devices and opt out. We may
 	 * want to adjust the protocol later adding a proper event for dealing
 	 * with accelerometers and implement here accordingly */
-	if (has_abs && !has_key)
+	if (has_abs && !has_key && !device->is_mt)
 		return -1;
 
 	if ((device->caps &
-- 
1.7.8.6



More information about the wayland-devel mailing list