Hello Shvetsov,

Thursday, May 24, 2007, 12:38:01 AM, you wrote:

> I use evtouch driver rather than tslib. It ocurred, that it handles events a
> bit differently: when you stop touching screen tslib ignores information
> about cursor position, but evtouch doesn't.
> The bug defenetely is in ts-adc-debounce  driver , but the same problem can be
> with other drivers. When you release pen, driver still sends coordinates,
> of course they are not set, so (0, 0) is sent. As a result cursor is
> firstly moved to the left bottom corner of the screen and only then
> mouse button release event is generated. So you actually can't click on
> any button.

        Well, first of all, ts-adc-debounce already has tests for pen
release condition, and adding yet another won't help much on overall
scale, just make it all more tangled and hard to tweak for specific
devices. Instead, we should elaborate existing tests.

        Secondly, if you looked at the driver, such an event
explicitly generated at the end of touch, see line 197. And that's
arguably correct, as driver must report when the touch was finished,
and it's not always possible to do that with the last reported correct
coordinates. So, it seems like bug in evtouch which tries to interpret
coordinates of lifted pen (??). Of course, it could be that issue is
still in ts-adc-debounce (and all other drivers we have been having,
on which it is based), but please prove that.


> patch for ts-adc-debounce.c

> -----------------------------------------------------------------------------------------

> Index: drivers/input/touchscreen/ts-adc-debounce.c
> ===================================================================
> RCS file:
> /cvs/linux/kernel26/drivers/input/touchscreen/ts-adc-debounce.c,v
> retrieving revision 1.43
> diff -d -u -r1.43 ts-adc-debounce.c
> --- drivers/input/touchscreen/ts-adc-debounce.c 4 Apr 2007 13:35:01 -0000
> 1.43
> +++ drivers/input/touchscreen/ts-adc-debounce.c 23 May 2007 16:12:07 -0000
> @@ -76,8 +76,12 @@
>  {
>         input_report_key(ts->input, BTN_TOUCH, pressure != 0);
>         input_report_abs(ts->input, ABS_PRESSURE, pressure);
> -       input_report_abs(ts->input, ABS_X, x);
> -       input_report_abs(ts->input, ABS_Y, y);
> +       // Don't send coordinates if pen was released, driver is confused
> +       // and click occurs in left bottom corner
> +       if (pressure) {
> +               input_report_abs(ts->input, ABS_X, x);
> +               input_report_abs(ts->input, ABS_Y, y);
> +               }
>         input_sync(ts->input);
>  }

> ---------------------------------------------------------------------------------------------------------------------------------------------



-- 
Best regards,
 Paul                            mailto:[EMAIL PROTECTED]

_______________________________________________
Hx4700-port mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/hx4700-port

Reply via email to