From 25c4b40ffbe9b54c0689c15d28849bc3bcfe9bdb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 Sep 2012 15:58:17 +1000 Subject: [PATCH] Set the transformation matrix to the unity matrix to avoid spurious cursor jumps (#852841) --- ...set-the-device-transformation-matrix.patch | 32 +++++++++++++++++++ xorg-x11-server.spec | 10 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0001-dix-set-the-device-transformation-matrix.patch diff --git a/0001-dix-set-the-device-transformation-matrix.patch b/0001-dix-set-the-device-transformation-matrix.patch new file mode 100644 index 0000000..7a3a398 --- /dev/null +++ b/0001-dix-set-the-device-transformation-matrix.patch @@ -0,0 +1,32 @@ +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 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index cc6afa1..4a671e2 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -43,7 +43,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.13.0 -Release: 4%{?gitdate:.%{gitdate}}%{dist} +Release: 5%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -115,6 +115,10 @@ Patch7053: 0001-scan-pci-after-probing-devices.patch Patch7054: 0001-config-udev-ignore-change-on-drm-devices.patch +# Bug 852841 - Mouse jumps to edges / corners when using an absolute input +# device (ie virtual machine usb tablet) +Patch7055: 0001-dix-set-the-device-transformation-matrix.patch + %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri %global sdkdir %{_includedir}/xorg @@ -587,6 +591,10 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Thu Sep 20 2012 Peter Hutterer 1.13.0-5 +- Set the transformation matrix to the unity matrix to avoid spurious cursor + jumps (#852841) + * Fri Sep 14 2012 Dave Airlie 1.13.0-4 - fix bug when hotplugging a monitor causes oops