All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gerecke <killertofu@gmail.com>
To: Ping Cheng <pinglinux@gmail.com>, jkosina@suse.cz
Cc: linux-input@vger.kernel.org, Ping Cheng <pingc@wacom.com>
Subject: Re: [PATCH 1/2] HID: wacom: do not send pen events before touch is up/forced out
Date: Wed, 04 Mar 2015 16:27:44 -0800	[thread overview]
Message-ID: <54F7A300.4090307@gmail.com> (raw)
In-Reply-To: <1424471158-4668-1-git-send-email-pingc@wacom.com>

On 2/20/2015 2:25 PM, Ping Cheng wrote:
> If pen comes in proximity while touch is down, we force touch up
> before sending pen events. Otherwise, there can be unfinished
> touch events compete with pen events. This idea has been fully
> implemented for Tablet PCs. But other tablets that support both
> pen and touch are not fully considered.
>
> Signed-off-by: Ping Cheng <pingc@wacom.com>

Acked-by: Jason Gerecke <killertofu@gmail.com>

-- 
Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....

> ---
>   drivers/hid/wacom_wac.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index 046351c..69827c9 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -554,6 +554,9 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
>   	if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
>   		wacom->shared->stylus_in_proximity = true;
>
> +	if (wacom->shared->touch_down)
> +		return 1;
> +
>   	/* in Range while exiting */
>   	if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) {
>   		input_report_key(input, BTN_TOUCH, 0);
> @@ -1759,6 +1762,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
>   		return 0;
>   	}
>
> +	if (wacom->shared->touch_down)
> +		return 0;
> +
>   	prox = (data[1] & 0x20) == 0x20;
>
>   	/*
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2015-03-05  0:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 22:25 [PATCH 1/2] HID: wacom: do not send pen events before touch is up/forced out Ping Cheng
2015-03-05  0:27 ` Jason Gerecke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F7A300.4090307@gmail.com \
    --to=killertofu@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=pingc@wacom.com \
    --cc=pinglinux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.