[PATCH] dix: scale y back instead of x up when pre-scaling coordinates

Emmanuel Benisty benisty.e at gmail.com
Fri Jul 19 08:22:08 PDT 2013


Hi Peter,

On Fri, Jul 19, 2013 at 10:16 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> The peculiar way we handle coordinates results in relative coordinates on
> absolute devices being added to the last value, then that value is mapped to
> the screen (taking the device dimensions into account). From that mapped
> value we get the final coordinates, both screen and device coordinates.
>
> To avoid uneven scaling on relative coordinates, they are pre-scaled by
> screen ratio:resolution:device ratio factor before being mapped. This
> ensures that a circle drawn on the device is a circle on the screen.
>
> Previously, we used the ratio to scale x up. Synaptics already does its own
> scaling based on the resolution and that is done by scaling y down by the
> ratio. So we can remove the code from the driver and get approximately the
> same behaviour here.
>
> Minor ABI bump, so we can remove this from synaptics.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

I've been testing this patch on the top of 1.14.1.902 and in
combination with the synaptics patch [0]. Everything works as
expected.

Thanks a lot.

Tested-by: Emmanuel Benisty <benisty.e at gmail.com>

Feel free to add my Tested-by for synaptics patch as well.

[0] http://lists.x.org/archives/xorg-devel/2013-July/036978.html


More information about the xorg-devel mailing list