Merge branch 'opendreambox' of /home/tmbinc/openembedded.git/ into opendreambox
[vuplus_openembedded] / packages / xorg-xserver / xserver-kdrive-1.4.0.90 / xorg-1.4-kdrive-rotation.patch
1 diff -rup a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
2 --- a/hw/kdrive/src/kinput.c    2007-08-23 21:04:53.000000000 +0200
3 +++ b/hw/kdrive/src/kinput.c    2007-12-22 12:53:27.679853402 +0100
4 @@ -2075,19 +2075,25 @@ KdEnqueuePointerEvent(KdPointerInfo *pi,
5  
6      /* we don't need to transform z, so we don't. */
7      if (flags & KD_MOUSE_DELTA) {
8 +/* does it really make sense to transform relative coordinates depending on screen rotation??
9         if (pi->transformCoordinates) {
10             x = matrix[0][0] * rx + matrix[0][1] * ry;
11             y = matrix[1][0] * rx + matrix[1][1] * ry;
12         }
13 -       else {
14 +       else {*/
15             x = rx;
16             y = ry;
17 -       }
18 +/*     }*/
19      }
20      else {
21         if (pi->transformCoordinates) {
22             x = matrix[0][0] * rx + matrix[0][1] * ry;
23             y = matrix[1][0] * rx + matrix[1][1] * ry;
24 +/* negative absolute values indicate calculation from the oposite end of the axis */
25 +            if (x < 0)
26 +                x += matrix[0][2];
27 +            if (y < 0)
28 +                y += matrix[1][2];
29         }
30         else {
31             x = rx;