xserver-kdrive_1.4.090: fix rotated tslib input
authorThomas Kunze <thommycheck@gmx.de>
Mon, 20 Oct 2008 13:27:17 +0000 (15:27 +0200)
committerThomas Kunze <thommycheck@gmx.de>
Mon, 20 Oct 2008 13:27:17 +0000 (15:27 +0200)
* close #3741

packages/xorg-xserver/xserver-kdrive-1.4.0.90/xorg-1.4-kdrive-rotation.patch [new file with mode: 0644]
packages/xorg-xserver/xserver-kdrive_1.4.0.90.bb

diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.0.90/xorg-1.4-kdrive-rotation.patch b/packages/xorg-xserver/xserver-kdrive-1.4.0.90/xorg-1.4-kdrive-rotation.patch
new file mode 100644 (file)
index 0000000..5e3eb8e
--- /dev/null
@@ -0,0 +1,31 @@
+diff -rup a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
+--- a/hw/kdrive/src/kinput.c   2007-08-23 21:04:53.000000000 +0200
++++ b/hw/kdrive/src/kinput.c   2007-12-22 12:53:27.679853402 +0100
+@@ -2075,19 +2075,25 @@ KdEnqueuePointerEvent(KdPointerInfo *pi,
+     /* we don't need to transform z, so we don't. */
+     if (flags & KD_MOUSE_DELTA) {
++/* does it really make sense to transform relative coordinates depending on screen rotation??
+       if (pi->transformCoordinates) {
+           x = matrix[0][0] * rx + matrix[0][1] * ry;
+           y = matrix[1][0] * rx + matrix[1][1] * ry;
+       }
+-      else {
++      else {*/
+           x = rx;
+           y = ry;
+-      }
++/*    }*/
+     }
+     else {
+       if (pi->transformCoordinates) {
+           x = matrix[0][0] * rx + matrix[0][1] * ry;
+           y = matrix[1][0] * rx + matrix[1][1] * ry;
++/* negative absolute values indicate calculation from the oposite end of the axis */
++            if (x < 0)
++                x += matrix[0][2];
++            if (y < 0)
++                y += matrix[1][2];
+       }
+       else {
+           x = rx;
index 1f047f0..963b112 100644 (file)
@@ -3,7 +3,7 @@ require xserver-kdrive-common.inc
 DEPENDS += "hal libxkbfile libxcalibrate pixman"
 
 PE = "1"
-FILE_PR = "r2"
+FILE_PR = "r3"
 
 SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
        ${KDRIVE_COMMON_PATCHES} \
@@ -24,6 +24,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
        file://xorg-avr32-support.diff;patch=1 \
        file://pkgconfig_fix.patch;patch=1 \
         file://no_xkb.patch;patch=1;pnum=0 \
+       file://xorg-1.4-kdrive-rotation.patch;patch=1 \
         "
 
 S = "${WORKDIR}/xorg-server-${PV}"