From 171059409177652b9b7af31506dd8ee0e018330d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 Sep 2012 01:22:32 +1000 Subject: [PATCH] dix: set the device transformation matrix The property handler is registered after setting the property, so dev->transform remains as all-zeros. That causes pixman_f_transform_invert() to fail (transformAbsolute()) and invert remains as garbage. In some cases, this may then cause a cursor jump to 0,0. Signed-off-by: Peter Hutterer --- dix/devices.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 46c759c..3cacbeb 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, -- 1.7.11.2