[xserver][PATCH] Tablet to screen coordinate translation
Peter Hutterer
mailinglists at who-t.net
Tue Mar 6 16:13:31 PST 2007
On 05/03/2007, at 04:29 , Magnus Vigerlöf wrote:
> Mmm... I split the GPE into two (extention and core) to cause minimal
> disturbances to the current code base and to be compatible with the
> current
> implementations of the other input devices, but I'll try to redo
> the patch
> according to these ideas instead.
we only need to scale core events, not XI events. The XI specs say
that if mode is Absolute, the axis values are whatever the device
reports. Unfortunately it is not as explicit about relative
coordinates, but I read it as the same.
If an app can't deal with the original values from the device (which
may be greater than the screen dimensions), bad luck for the app.
The way how I see it, is that we only need to scale the core events
down to the screen. At the moment, GPE doesn't do this, it scales
everything. Instead, it should scale x/y for the core events and for
the cursor position, but not for the valuators. I guess a starting
point would be removing the "/* Drop x and y back into the valuators
list ..." and go from there, but that's just a quick guess.
So yes, we need some conversion proc in the device that knows how to
scale to screen coordinates, but I disagree with daniel. In GPE, we
have the device, if the device has a conversion proc, call it then
and there. No point in having the DDX sift through the event list and
change events. This is just calling for trouble, but people are free
to disagree with me.
> Question though: This means that we need a new method in the
> LocalDeviceRec
> structure or somwhere near to be called with the generated events for
> conversion. Is the struct above 'included' in the version defined by
> ABI_XINPUT_VERSION, or is there a better suited one that can be used?
put it in, test it, worry about ABI later. We may need a couple of
iterations anyway.
Cheers,
Peter
--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx
More information about the xorg
mailing list