[RFC] dix: Re-introduce rescaling on motion events for extended event reporting
Magnus Vigerlöf
Magnus.Vigerlof at home.se
Wed Dec 19 10:20:12 PST 2007
On onsdag 19 december 2007, Peter Hutterer wrote:
[...]
> > This time I haven't introduced any interface changes. The values that
> > should be reported for the device are the same as in xserver 1.3,
> > including the max-values on X&Y. The drivers that has been adapted to
> > cope with the current situation will continue to work as the max-value
> > registered by the driver is used in the scaling.
>
> one thing: in the proposed patch, pDev->valuator->lastx/lasty are set
> before the call to miPointerSetPosition. lastx/lasty of the VCP however
> afterwards.
> miPSP may change x/y if there was a screen switch. so you may end up
> with different coordinates here.
>
> could this be a problem? I've looked at the code several times but I'm
> still unsure.
When I read miPSP I get the impression that devices with well defined axis
that are suitable for absolute reporting will never trigger a screen switch..
So I'd say that they will be untouched.
With or without the patch, clipAxis will be called and for those devices with
a defined min/max and everything outside the range will be trimmed. This
value will then be used (with patch, after scaling to the screen size) for
screen coords which are well within limits already.
Maybe this behaviour is a fault in itself and relative movements should
perhaps never call clipAxis? (which, btw, doesn't always clip to max but
always to min) That would be a different patch tough.
If we remove those calls from the relative reporting then, for the two events
to be in sync, they must be scaled again into the device coordinate system.
At the moment it would work as it does in xserver 1.3 (the extension event is
generated before the core and the call to
miPointerAbsoluteCursor/miPointerPosition).
I just realised that I missed to take into account the min-value of the axis,
so I'll have to redo the patch and test with that adjustment too.
> aside from that, I'd say its fine.
Thanks for the comments!
Cheers
Magnus
More information about the xorg
mailing list