Does touchpads have buttons?
Peter Hutterer
peter.hutterer at who-t.net
Tue Sep 30 06:23:01 PDT 2008
On Tue, Sep 30, 2008 at 03:14:17PM +0200, Søren Hauberg wrote:
> My impression is that the ones in EvdevRec means something different.
> The ones in the 'touchscreen' struct are the calibration parameters.
> 'min_x' is the smallest x value that the hardware actually sends, and
> similar for the other fields. So, I get x values in the range
>
> [EvdevRec.touchscreen.min_x, EvdevRec.touchscreen.max_x]
>
> and I need to transform these linearly into the range
>
> [EvdevRec.min_x, EvdevRec.max_x]
min/max is read from the kernel at startup. So you mean there's a difference
in the axis range the kernel reports and the actual value range in the events?
Does the kernel report axis ranges at all?
> So, yes, you understand correctly. From what I understand, some
> devices (including mine) does this, and there is no way for the kernel
> to detect it (this is my understanding, it might not be the truth).
> Currently, the 'usbtouchscreen' kernel module has a parameter
> 'swap_xy' that makes the swap, but from what I understand, the kernel
> developers are likely to remove this in the future, since it won't
> work when you have multiple touch screens attached. I doubt we'll see
> it fixed in the kernel (I don't know how to do it), which is why I
> wanted the parameter in this driver. I can remove it if you don't want
> it, but I think it's needed.
hmm. leave it out for now and let's focus on getting the touchscreen support.
we can put quirks like this in later, as a separate patch.
>
> > +
> > + if (pEvdev->flags & EVDEV_TOUCHSCREEN)
> > + EvdevInitTouchscreen(pInfo);
> >
> > I trust that'll disappear from the final patch.
>
> Why? (remember, I'm an X-newbie) I need to initialize the device to
> get parameters. How would you like me to do this?
all the parameters in InitTouchscreen were hardcoded. Just move what you have
to into EvdevPreInit (but with the invert and swap culling there is only
min/max left anyway). Get it from the options there (xf86SetIntOption(...) for
example).
Cheers,
Peter
More information about the xorg
mailing list