[PATCH:xf86-input-mouse 2/4] Add support for absolute positioning (tablets).

Daniel Stone daniel at fooishbar.org
Mon Aug 19 09:17:32 PDT 2013


Hi,

On 19 August 2013 10:14, Thomas Klausner <wiz at netbsd.org> wrote:
> +       case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
> +           miPointerGetPosition (pInfo->dev, &x, &y);
> +           x = event->value;
> +           miPointerSetPosition (pInfo->dev, Absolute, (double *)&x, (double *)&y);
> +           xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y);
> +           ++event;
> +           continue;

Please eliminate the mipointer calls, and replace them with:
xf86PostMotionEvent(pInfo->dev, TRUE, 0, 1, x);

> +       case WSCONS_EVENT_MOUSE_ABSOLUTE_Y:
> +           miPointerGetPosition (pInfo->dev, &x, &y);
> +           y = event->value;
> +           miPointerSetPosition (pInfo->dev, Absolute, (double *)&x, (double *)&y);
> +           xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y);
> +           ++event;
> +           continue;

And similarly this with:
xf86PostMotionEvent(pInfo->dev, TRUE, 1, 1, y);

Cheers,
Daniel


More information about the xorg-devel mailing list