[xserver][PATCH] Tablet to screen coordinate translation
Peter Hutterer
mailinglists at who-t.net
Thu Mar 8 17:56:23 PST 2007
> If we say that extension and core events should be generated within
> the same
> function I agree that the existing structs are not enough.
yes. we really want to have it in one function only. otherwise we end
up with the same nightmare we had not too long ago...
> So.. Adding two function pointers to DeviceIntRec is the preferred
> way? [...]
> But that would force us to use the same interface as the old
> functions, maybe
> we should update the parameters to these two functions while we're
> at it?
If you're breaking one struct, you might as well break the other one.
> In that case the first function which could update the function
> pointers seems
> to be the DEVICE_INIT call for the device. We'll spread out the
> code for
> filling in the struct, but for initialization it should be safe
> enough. A bit
> confusing for the driver designer perhaps...
apologize my ignorance, having never written a driver I don't quite
understand what you mean.
At the moment all you have to do is get the conversion_proc and
reverse_conversion_proc into the DeviceIntRec, right? This can be
done in xf86ActivateDevice.
Once they are in there, you can call them from GPE. The only
additional thing I see right now is that you have to pass the screen
limits in somewhere to adjust the scaling properly. So if you change
the parameters to the conversion proc to take in another two ints,
you can basically use the existing code (provided you adjust the
functions).
Am I missing something?
Cheers,
Peter
--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx
More information about the xorg
mailing list