From patchwork Thu Dec 9 23:19:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 396802 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB9NJMOE001579 for ; Thu, 9 Dec 2010 23:19:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754916Ab0LIXTV (ORCPT ); Thu, 9 Dec 2010 18:19:21 -0500 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:39386 "EHLO ch-smtp02.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754392Ab0LIXTU (ORCPT ); Thu, 9 Dec 2010 18:19:20 -0500 Received: from c83-248-200-95.bredband.comhem.se ([83.248.200.95]:40578 helo=polaris) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.68) (envelope-from ) id 1PQplY-0001Bw-7b; Fri, 10 Dec 2010 00:19:15 +0100 Received: by polaris (sSMTP sendmail emulation); Fri, 10 Dec 2010 00:19:07 +0100 From: "Henrik Rydberg" To: Dmitry Torokhov Cc: Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Henrik Rydberg Subject: [PATCH] input: mt: Identify pointer emulation contact Date: Fri, 10 Dec 2010 00:19:05 +0100 Message-Id: <1291936745-4973-1-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 X-Originating-IP: 83.248.200.95 X-Scan-Result: No virus found in message 1PQplY-0001Bw-7b. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1PQplY-0001Bw-7b 2122fc303cfc9691ecc69f7a275927c2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Dec 2010 23:19:23 +0000 (UTC) diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index afaf059..bcd2c22 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -105,7 +105,8 @@ EXPORT_SYMBOL(input_mt_report_slot_state); * @dev: input device with allocated MT slots * * Performs legacy pointer emulation via BTN_TOUCH, ABS_X, ABS_Y and - * ABS_PRESSURE. Touchpad finger count is emulated using + * ABS_PRESSURE. If enabled, ABS_TRACKING_ID is emitted whenever the + * pointer contact changes. Touchpad finger count is emulated using * BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP and * BTN_TOOL_QUADTAP. * @@ -146,6 +147,7 @@ void input_mt_report_pointer_emulation(struct input_dev *dev) input_event(dev, EV_ABS, ABS_X, x); input_event(dev, EV_ABS, ABS_Y, y); input_event(dev, EV_ABS, ABS_PRESSURE, p); + input_event(dev, EV_ABS, ABS_TRACKING_ID, oldid); } else { input_event(dev, EV_ABS, ABS_PRESSURE, 0); } diff --git a/include/linux/input.h b/include/linux/input.h index 65f7799..01dde9b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -716,6 +716,7 @@ struct input_keymap_entry { #define ABS_TILT_X 0x1a #define ABS_TILT_Y 0x1b #define ABS_TOOL_WIDTH 0x1c +#define ABS_TRACKING_ID 0x1d /* ID of contact governing ABS_{X,Y} */ #define ABS_VOLUME 0x20