Erratic cursor movement when using "Coordinate Transformation Matrix"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg-server (Ubuntu) |
Fix Released
|
Medium
|
Chase Douglas | ||
Natty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
==================
In previous releases of xserver-
The fix involves maintaining and using the proper previous states of the X and Y event coordinates when performing the input coordinate transformation. If one coordinate is updated but not the other, the other's previous untransformed coordinate must be used to compute the correct new transformed coordinates. Then, the new transformed coordinates must be compared to the previous transformed coordinates to see if they should be reported to the client. Unchanged values are not reported in some XI 1.x and 2.x events. The current X server conflates the previous untransformed and previous transformed values and ends up calculating the new transformed values incorrectly.
TEST CASE:
To reproduce, use xinput to set a new coordinate transformation matrix with a rotation. For example, use a 90 degree turn by setting the input coordinate transformation matrix to 0 -1 1 1 0 0 0 0 1. See the above wiki page for details on how to set the matrix. Then, try to touch the touchscreen and move the cursor. The cursor will jump arround erratically when moving in pure horizontal or pure vertical motions.
The risk of regression is minimal because the only time the fix will cause a change is when the transformation matrix has been modified from the identity matrix to a matrix including some amount of rotation. The patch was also tested in the xorg-edgers ppa for a few weeks before it was even uploaded to Oneiric.
Original Bug Report:
=======
When using something like `xinput set-float-prop $INPUTDEV "Coordinate Transformation Matrix" 0.0 -1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0` to match the coordinates of a touchscreen/tablet to a rotated (transformed) screen, the cursor moves around erratically.
From the original report of david-dklevine (https:/
when a horizontal or vertical drag is performed the cursor jumps wildly - it appears to jump between what it should be according to the coordinate transformation and what it would be if x=0 and y=1 (that is if the second line of the matrix was the identity). With a diagonal drag or a touch the cursor appears where it should be.
In addition to the Cando Multi Touch Panel reported at https:/
lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
$ apt-cache policy xserver-
xserver-
Installed: 1:2.6.0-1ubuntu12
Candidate: 1:2.6.0-1ubuntu12
Version table:
*** 1:2.6.0-1ubuntu12 0
500 http://
100 /var/lib/
Changed in xserver-xorg-input-evdev (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Chase Douglas (chasedouglas) |
Changed in xserver-xorg-input-evdev (Ubuntu): | |
status: | In Progress → Fix Committed |
affects: | xserver-xorg-input-evdev (Ubuntu) → xorg-server (Ubuntu) |
tags: | added: edgers |
tags: | added: patch |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: verification-failed removed: verification-done |
tags: | added: testcase |
This bug was fixed in the package xorg-server - 2:1.10.1-1ubuntu2
---------------
xorg-server (2:1.10.1-1ubuntu2) oneiric; urgency=low
* Fix masked transformed valuator handling (LP: #774938) patches/ 503_fix_ masked_ transformed_ valuators. patch
- Added debian/
-- Bryce Harrington <email address hidden> Tue, 17 May 2011 14:44:58 -0700