lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 25 May 2016 17:13:50 -0700
From:	'Dmitry Torokhov' <dmitry.torokhov@...il.com>
To:	廖崇榮 <kt.liao@....com.tw>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	zac.hsieh@....com.tw,
	'黃世鵬 經理' <phoenix@....com.tw>,
	'Charles Mooney' <charliemooney@...gle.com>,
	'Agnes Cheng' <agnescheng@...gle.com>,
	'jeff' <jeff.chuang@....com.tw>
Subject: Re: [PATCH] Emit BTN_TOO_FINGER in function
 input_mt_report_pointer_emulation if touchpad meets hover condition

Hi KT,

On Wed, May 25, 2016 at 07:44:57PM +0800, 廖崇榮 wrote:
> Hi Dmitry,
> 
> Update /input/mouse/input-mt.c
> Emit BTN_TOO_FINGER in input_mt_report_pointer_emulation if touchpad meets hover condition.

Please do not top-post and also do not send patches as attachments,
they should be sent inline. Please take a look at "git send-email"
command.

Thanks.

> 
> Thanks & BR	KT
> 
> -----Original Message-----
> From: 'Dmitry Torokhov' [mailto:dmitry.torokhov@...il.com] 
> Sent: Friday, May 20, 2016 8:52 AM
> To: 廖崇榮
> Cc: linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; zac.hsieh@....com.tw; '黃世鵬 經理'; 'Charles Mooney'; 'Agnes Cheng'; 'jeff'
> Subject: Re: [PATCH] Input: Change BTN_TOOL_FINGER flag when hover event trigger
> 
> On Tue, May 17, 2016 at 10:20:40PM +0800, 廖崇榮 wrote:
> > Hi Dmitry,
> > 
> > I want to confirm my thought for your idea to avoid misunderstanding.
> > I think you want to encapsulate " BTN_TOOL_FINGER" in the [input_mt_report_pointer_emulation] if hover happen.
> > Vendor driver only report "ABS_DISTANCE" and let [input_mt_report_pointer_emulation] emit BTN_TOOL_FINGER report without change function parameter.
> > 
> > Please let me know if my misunderstand about your idea.
> 
> Yes, that is correct. Something like this:
> 
> diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 54fce56..a1bbec9 100644
> --- a/drivers/input/input-mt.c
> +++ b/drivers/input/input-mt.c
> @@ -218,8 +218,23 @@ void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count)
>  	}
>  
>  	input_event(dev, EV_KEY, BTN_TOUCH, count > 0);
> -	if (use_count)
> +
> +	if (use_count) {
> +		if (count == 0 &&
> +		    !test_bit(ABS_MT_DISTANCE, dev->absbit) &&
> +		    test_bit(ABS_DISTANCE, dev->absbit) &&
> +		    input_abs_get_val(dev, ABS_DISTANCE) != 0) {
> +			/*
> +			 * Force reporting BTN_TOOL_FINGER for devices that
> +			 * only report general hover (and not per-contact
> +			 * distance) when contact is in proximity but not
> +			 * on the surface.
> +			 */
> +			count = 1;
> +		}
> +
>  		input_mt_report_finger_count(dev, count);
> +	}
>  
>  	if (oldest) {
>  		int x = input_mt_get_value(oldest, ABS_MT_POSITION_X);
> 
> --
> Dmitry



-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ