On Mon, Jun 21, 2010 at 11:06:28PM +0200, Éric Piel wrote: > When 2 fingers are pressed, the low and high coordinates are given. > Instead of reporting just the low coordinate as the normal position, > report an average of both. This allow to have the cursor always move, > whichever finger moves. In practice, this improves the support of > two-fingers scolling with the synaptics X driver. > > Signed-off-by: Éric Piel <eric.piel@xxxxxxxxxxxxxxxx> > --- > drivers/input/mouse/elantech.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c > index c84f741..d1b505a 100644 > --- a/drivers/input/mouse/elantech.c > +++ b/drivers/input/mouse/elantech.c > @@ -301,11 +301,11 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) > /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ > y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); > /* > - * For compatibility with the X Synaptics driver scale up > - * one coordinate and report as ordinary mouse movent > + * For compatibility with non-multitouch userspace apps > + * report the average of both coordinates and scale up. > */ > - input_report_abs(dev, ABS_X, x1 << 2); > - input_report_abs(dev, ABS_Y, y1 << 2); > + input_report_abs(dev, ABS_X, (x1 + x2) << 1); > + input_report_abs(dev, ABS_Y, (y1 + y2) << 1); I am concerned what happens when you put one finger first and then add another one. Would not that couse the cursor to jump? I'd say we need to obey MT protocol and continue reporting the first contact in non-MT protocol and rely on MT-aware drivers to do better job of contact tracking. This is also consistent with how other drivers, such as bcm5974, report coordinates. -- 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