Shvetsov Alexey V. пишет:
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.

Another version of patch, that reports last coordinates on release:

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 @@
 {
+       static int last_x, last_y;
        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);
+               last_x = x;
+               last_y = y;
+               }
+       else {
+               input_report_abs(ts->input, ABS_X, last_x);
+               input_report_abs(ts->input, ABS_Y, last_y);
+       }
        input_sync(ts->input);
 }

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

Reply via email to