qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [RFC] usb-wacom


From: andrzej zaborowski
Subject: Re: [Qemu-devel] [PATCH] [RFC] usb-wacom
Date: Thu, 14 Aug 2008 13:52:33 +0200

Hiya,

2008/8/14 François Revol <address@hidden>:
> First, mouse stayed in the top-left corner... Seems coords were set to
> 0,0 when no button is pressed, which is wrong, most tablets actually
> sense the stylus even when it's not yet touching the surface.

The wacom-tablet was implemented to emulate a touchscreen originally,
because Linux doesn't by default have drivers for any hotpluggable
touchscreen. Reporting 0,0 when not touching allows the emulation to
be used with tslib.  With a real tablet the stylus can also be too far
above the surface for the coords to be avilable, but I don't know what
coords are being reported then.

>
> Also, coords were wrong.
> Our driver takes the pos from the hardware, and scales them from model-
> dependant hardcoded max values:
> http://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/input_server/devices/wacom/TabletDevice.cpp#L115
> down to [0.0f, 1.0f], which represents the whole screen.
> Since QEMU reports absolute mouse position scaled from screen size to
> INT16_MAX this didn't really work.
> Now, I'm not sure those max values are correct for all Penpartner
> devices, or if they were calibrated on a specific item.

I'm don't know either I'm afraid, for my use case it didn't matter
because tslib will calibrate the input anyway.  It may be useful
adding the correct HID descriptors (I though we already had them).

> Best would be to actually read them from the HID descriptor, but QEMU
> doesn't provide one, and I read some penpartner tablets actually have
> wrong descriptors anyway.
>
> Finaly, I fixed button handling according to our driver, not sure all
> drivers handle them the same. pressure indicates left button, and a
> flag tells about right one. I mapped middle button to the eraser to at
> least be useful in tablet-aware software though I'm not sure it's the
> best way.

I'll check if this works with Linux also, when I get a chance. I
didn't look at your patch yet as I'm away form my desktop

Cheers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]