generic touchscreen calibration

Dan Nicholson dbn.lists at gmail.com
Mon Sep 14 13:46:55 PDT 2009


On Mon, Sep 14, 2009 at 12:26 PM, Tias <tias at ulyssis.org> wrote:
> Søren Hauberg wrote:
>> Hi,
>>
>> 2009/9/10 Tias <tias at ulyssis.org>:
>>> In the end, I had to hack up the ancient tkxinput because it was the only
>>> device independent calibrator (it uses Xinput to read the coordinates). On
>>> the other hand, I was impressed by the simplicity of the calibrator that
>>> Soren Hauberg sent to this list in july (thread titled 'Evdev touchscreen
>>> calibration?'), although it was written for usbtouchscreen driven devices
>>> specifically.
>>>
>>>
>>> I figured that a generic calibration program should be device independent
>>> when reading calibration data, and device dependent in how to use the data.
>>>
>>> I've adapted Soren's calibrator to do exactly this: it reads the current
>>> calibration from Xinput. When the usbtouchscreen driver is used, it
>>> dynamically changes the calibration. Otherwise it prints the new calibration
>>> data in xorg.conf format on stdout. Other actions would be possible too,
>>> like rewriting the xorg.conf directly, maybe even use some new evdev/Xinput2
>>> goodness ?
>>
>> It's been quite a while since I was working on this (I changed job, so
>> I never got to finish this), so my comments might not actually be
>> true.
>>
>> First, I'd like to add that I'm glad you're spending time on
>> resurecting my old code. Thanks :-)
>>
>> Second, part of this code was added before the 'evdev' X11 driver got
>> support for touchscreens. This driver allows you to set the
>> calibration parameters at run-time without making changes to xorg.conf
>> (hence no restart of X). I think the calibration tool should use this
>> instead of working with xorg.conf.
>
> Wauw, it would be great to use this new 'evdev' functionality!
> Where can I find out the details about this ? Or could somebody provide
> a code sample or something ?

It makes use of the XI Properties support in newer servers. See the
SUPPORTED PROPERTIES section in evdev(4) for the property names. You
can then use the xinput tool to adjust the properties at run time. You
could probably look at the xinput source code for inspiration on
adjusting the properties from a new gui app.

--
Dan



More information about the xorg mailing list