From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Florian Echtler <floe@butterbrot.org>
Cc: linux-input@vger.kernel.org, Martin Kaltenbrunner <modin@yuri.at>,
Peter Hutterer <peter.hutterer@who-t.net>
Subject: Re: [PATCH 2/2] skip all blobs that are not touches
Date: Mon, 10 Jul 2017 11:11:20 -0700 [thread overview]
Message-ID: <20170710181120.GC23984@dtor-ws> (raw)
In-Reply-To: <ebe3ea9a-d79c-8fbc-db96-adb878a53848@butterbrot.org>
On Mon, Jul 10, 2017 at 09:11:53AM +0200, Florian Echtler wrote:
> Good point, I'll send an updated patch ASAP.
>
> Related question: we first attempted to label non-touch objects as MT_TOOL_PALM,
> but it looks like userspace (Xorg in particular) doesn't actually distinguish
> between MT_TOOL_* types; is that correct?
It really should, but I think Peter never got around implementing this.
Also, I think it is a good idea to set touch major to max in this case.
I believe that that will help clients that do no understand MT_TOOL_PALM
to still do palm rejection.
Peter?
>
> Best, Florian
>
> On 09.07.2017 23:41, Dmitry Torokhov wrote:
> > On Sun, Jul 09, 2017 at 08:54:51PM +0200, Florian Echtler wrote:
> >> The SUR40 labels all reported blobs as touch, token, or generic blob.
> >> Previously, all blobs were reported as touch regardless of type, causing
> >> lots of false positives. Present patch fixes this.
> >>
> >> Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
> >> Signed-off-by: Florian Echtler <floe@butterbrot.org>
> >> ---
> >> drivers/input/touchscreen/sur40.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
> >> index 12bdee9..fbd4010 100644
> >> --- a/drivers/input/touchscreen/sur40.c
> >> +++ b/drivers/input/touchscreen/sur40.c
> >> @@ -309,6 +309,8 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input)
> >> int slotnum = input_mt_get_slot_by_key(input, blob->blob_id);
> >> if (slotnum < 0 || slotnum >= MAX_CONTACTS)
> >> return;
> >> + if (blob->type != SUR40_TOUCH)
> >> + return;
> >
> > I think we should be checking blob type before trying to get slot
> > number.
> >
> >>
> >> input_mt_slot(input, slotnum);
> >> input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);
> >> --
> >> 2.7.4
> >>
> >
> > Thanks.
> >
>
>
> --
> SENT FROM MY DEC VT50 TERMINAL
>
--
Dmitry
next prev parent reply other threads:[~2017-07-10 18:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 18:54 [PATCH 1/2] add additional reverse-engineered information Florian Echtler
2017-07-09 18:54 ` [PATCH 2/2] skip all blobs that are not touches Florian Echtler
2017-07-09 21:41 ` Dmitry Torokhov
2017-07-10 7:11 ` Florian Echtler
2017-07-10 18:11 ` Dmitry Torokhov [this message]
2017-07-14 7:54 ` Florian Echtler
2017-07-14 8:24 ` Peter Hutterer
2017-07-14 9:28 ` Florian Echtler
2017-07-14 22:13 ` Peter Hutterer
2017-07-09 21:40 ` [PATCH 1/2] add additional reverse-engineered information Dmitry Torokhov
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=20170710181120.GC23984@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=floe@butterbrot.org \
--cc=linux-input@vger.kernel.org \
--cc=modin@yuri.at \
--cc=peter.hutterer@who-t.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).