Re: [PATCH 3/4] Fix hover in Android (Gingerbread)

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

 



On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke <killertofu@xxxxxxxxx> wrote:
> As of Gingerbread, Android does not pay attention to if the pen
> is in contact with the screen, or merely in proximity. Since the
> Xorg Wacom driver does not make use of MT pen events, we simply
> do not emit MT data while hovering.

Hi Jason,

It would be nice if you could CC me next time. I would like to be
aware of the changes to the driver I wrote and use.

I guess the change below is ok, but it changes existing behavior. It
doesn't affect my apps (be aware that Xorg and Android may be the well
known users, but there are other custom apps).

Thanks,
jaya

>
> Signed-off-by: Jason Gerecke <killertofu@xxxxxxxxx>
> ---
>  Now being sent upstream to LKML at the behest of Google.
>
>  drivers/input/touchscreen/wacom_w8001.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
> index e94a21a..40ed685 100644
> --- a/drivers/input/touchscreen/wacom_w8001.c
> +++ b/drivers/input/touchscreen/wacom_w8001.c
> @@ -279,10 +279,12 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
>        input_report_key(dev, BTN_STYLUS, coord->f1);
>        input_report_key(dev, w8001->type, coord->rdy);
>
> -       input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
> -       input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
> -       input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
> -       input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
> +       if (coord->pen_pressure > 0) {
> +               input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
> +               input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
> +               input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
> +               input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
> +       }
>
>        input_mt_sync(dev);
>        input_sync(dev);
> --
> 1.7.5.2
>
> --
> 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
>
--
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