On Thu, Sep 20, 2012 at 06:12:56PM +0200, walter harms wrote:
> 
> 
> Am 20.09.2012 17:59, schrieb Chase Douglas:
> > On Wed, Sep 19, 2012 at 12:56 PM, Peter Hutterer
> > <[email protected]> wrote:
> >> The property handler is registered after setting the property, so
> >> dev->transform remains as all-zeros. That causes 
> >> pixman_f_transform_invert()
> >> to fail (in transformAbsolute()) and invert remains as garbage. This
> >> may then cause a cursor jump to 0,0.
> >>
> >> Since the axes are not yet initialized here and we need to allow for 
> >> drivers
> >> changing the matrix, we cannot use the property handler for matrix
> >> initialization, essentially duplicating the code.
> >>
> >> Triggered by the fix to (#49347) in 
> >> 749a593e49adccdf1225be28a521412ec85333f4
> >>
> >> https://bugzilla.redhat.com/show_bug.cgi?id=852841
> >>
> >> Signed-off-by: Peter Hutterer <[email protected]>
> >> ---
> >>  dix/devices.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/dix/devices.c b/dix/devices.c
> >> index 46c759c..77fde80 100644
> >> --- a/dix/devices.c
> >> +++ b/dix/devices.c
> >> @@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc 
> >> deviceProc, Bool autoStart)
> >>      /* unity matrix */
> >>      memset(transform, 0, sizeof(transform));
> >>      transform[0] = transform[4] = transform[8] = 1.0f;
> >> +    dev->transform.m[0][0] = 1.0;
> >> +    dev->transform.m[1][1] = 1.0;
> >> +    dev->transform.m[2][2] = 1.0;
> >>
> >>      XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
> >>                             XIGetKnownProperty(XATOM_FLOAT), 32,
> > 
> > Makes sense to me.
> > 
> > Reviewed-by: Chase Douglas <[email protected]>
> 
> 
> I do not know the code so this may be obvious ....
> Is the rest of dev->transform.m really =0.0 ?

yes, we need to set it to the unity matrix.

Cheers,
   Peter
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to