From patchwork Tue Dec 7 20:04:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 383992 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 oB7K4llC015456 for ; Tue, 7 Dec 2010 20:05:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754665Ab0LGUFJ (ORCPT ); Tue, 7 Dec 2010 15:05:09 -0500 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:45133 "EHLO ch-smtp02.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200Ab0LGUFI (ORCPT ); Tue, 7 Dec 2010 15:05:08 -0500 Received: from c83-248-196-64.bredband.comhem.se ([83.248.196.64]:41119 helo=[192.168.0.10]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1PQ3mE-0000KM-8P; Tue, 07 Dec 2010 21:04:44 +0100 Message-ID: <4CFE934D.4040309@euromail.se> Date: Tue, 07 Dec 2010 21:04:29 +0100 From: Henrik Rydberg User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Jiri Kosina CC: Dmitry Torokhov , Ping Cheng , Chris Bagwell , Peter Hutterer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] input: mt: Move tracking and pointer emulation to input-mt References: <1291722357-22820-1-git-send-email-rydberg@euromail.se> In-Reply-To: X-Originating-IP: 83.248.196.64 X-Scan-Result: No virus found in message 1PQ3mE-0000KM-8P. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1PQ3mE-0000KM-8P ea1549e59111c552f9417295ed485278 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]); Tue, 07 Dec 2010 20:05:09 +0000 (UTC) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 4e59b93..0104e1a 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -866,17 +866,18 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) int i; for (i = 0; i < 2; i++) { - int p = data[9 * i + 2] && !wacom->shared->stylus_in_proximity; + int p = data[9 * i + 2]; + bool touch = p && !wacom->shared->stylus_in_proximity; input_mt_slot(input, i); - input_mt_report_slot_state(input, MT_TOOL_FINGER, p); + input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); /* * Touch events need to be disabled while stylus is * in proximity because user's hand is resting on touchpad * and sending unwanted events. User expects tablet buttons * to continue working though. */ - if (p) { + if (touch) { int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff; int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff; if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {