Resend: [PATCH] xserver: Fix rotation of pointer

David Jander david.jander at protonic.nl
Thu Apr 16 01:03:15 PDT 2009


Rotation matrix for pointer coordinates was incomplete and pointers with 
absolute coordinates did not work correctly in xserver (kdrive) when the 
sceen was rotated any other than 0 degrees.

Signed-off-by: David Jander <david.jander at protonic.nl>
---
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 2875920..357a7e1 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1918,8 +1918,8 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long 
flags, int rx, int ry,
     }
     else {
 	if (pi->transformCoordinates) {
-	    x = matrix[0][0] * rx + matrix[0][1] * ry;
-	    y = matrix[1][0] * rx + matrix[1][1] * ry;
+	    x = matrix[0][0] * rx + matrix[0][1] * ry + matrix[0][2];
+	    y = matrix[1][0] * rx + matrix[1][1] * ry + matrix[1][2];
 	}
 	else {
 	    x = rx;


More information about the xorg-devel mailing list