Tablet to screen coordinate conversion (again)

Magnus Vigerlöf Magnus.Vigerlof at home.se
Sat Oct 27 17:17:36 PDT 2007


On söndag 28 oktober 2007, Giuseppe Bilotta wrote:
> On 10/27/07, Magnus Vigerlöf <Magnus.Vigerlof at home.se> wrote:
> > On lördag 27 oktober 2007, Giuseppe Bilotta wrote:
> > > Also, is there something I can do to work around this issue, at
> > > the driver level, other than claiming that the device limits are
> > > the same as the screen limits? Or would it be better to just wait
> > > for this to be fixed at the server level?
> >
> > We (linuxwacom) are scaling the coordinates to the screen size for
> > xserver 1.4. We also scale the max on X&Y for the tablet to the screen
> > size when initializing the tablet. Not the way we would like it to be,
> > but it works at least.
>
> I was afraid I'd have to resort to that. Do you have a pointer to the
> code handling this? I tried looking at the linuxwacom code yesterday,
> but I had problems following it (too much stuff in it, compared to the
> simple-minded acecad driver).

The patch with our changes for this issue is here: 
http://sourceforge.net/tracker/index.php?func=detail&aid=1805184&group_id=69596&atid=525126

That should be less to sift through than the whole driver :)

> > A better solution where we can report the real coordinates is planned
> > for xserver 1.4.1 according to Daniel S [1].
>
> Ah, good. Would it be possible to write cross-version code by using
> appropriate ifdefs, or should I just update the driver along the way,
> and only care about compatibility with the latest released xserver?
> (Something like GET_ABI_MAJOR(XORG_VERSION_CURRENT) or whatever)

As the linuxwacom driver must be able to support many versions of both X.org 
and XFree86, we're stuck with the #ifdef's...

Cheers
  Magnus



More information about the xorg mailing list