Re: [PATCH 2/2] skip all blobs that are not touches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> >> Signed-off-by: Florian Echtler <floe@xxxxxxxxxxxxxx>
> >> ---
> >>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux