[PATCH 1/2] evdev: Add support for device quirks and implement axes swapping

Rob Bradford rob at robster.org.uk
Wed Sep 19 05:38:43 PDT 2012

On 19 September 2012 07:09, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Tue, 18 Sep 2012 16:44:57 +0100

Hi Pekka,

> this seems to have quite much of code duplication. Would it not be any
> easier to do the swap only at notify_*() calling time instead?
> Or do you really need to limit it to these very specific evdev events?

This device only generates absolute events.

In the absolute case it takes into consideration the width and height
of the screen and it also adds this value onto the x and y of the
output. So doing it  later would require us to store the relative
position e.g. (e->value - device->abs.min_x) / (device->abs.max_x -
device->abs.min_x) and then apply the scale up to to width and output
position of x at the notify point.

I'll cook up a version of the patch that applies this at the point in
the code where it does the notify..



More information about the wayland-devel mailing list