summaryrefslogtreecommitdiff
path: root/packages/xorg-xserver/xserver-kdrive-xomap
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-08-02 07:15:30 +0000
committerKoen Kooi <koen@openembedded.org>2007-08-02 07:15:30 +0000
commitb3e110eff605bd2361ea92bd748f59e48d508f33 (patch)
tree585a741d28885236452581e718ba458c6fd02c3d /packages/xorg-xserver/xserver-kdrive-xomap
parent81ded5cd087778af9e1a13e7a207b55b5448e07b (diff)
xorg mega commit: merge in change from poky
Diffstat (limited to 'packages/xorg-xserver/xserver-kdrive-xomap')
-rw-r--r--packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch13
-rw-r--r--packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch122
2 files changed, 122 insertions, 13 deletions
diff --git a/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
index df5bbe2abf..c5997c2ffa 100644
--- a/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
+++ b/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
@@ -5,19 +5,6 @@
2 files changed, 39 insertions(+), 31 deletions(-)
-Index: xorg-server-1.1.99.3/configure.ac
-===================================================================
---- xorg-server-1.1.99.3.orig/configure.ac 2007-01-30 00:22:41.000000000 +0000
-+++ xorg-server-1.1.99.3/configure.ac 2007-01-30 00:22:41.000000000 +0000
-@@ -717,7 +717,7 @@ fi
-
- if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
- AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
-- REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
-+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateext"
- else
- XCALIBRATE=no
- fi
Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-30 00:44:13.000000000 +0000
diff --git a/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch b/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch
new file mode 100644
index 0000000000..fbe89b16b1
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch
@@ -0,0 +1,122 @@
+---
+ Xext/xcalibrate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
+ hw/kdrive/src/kdrive.h | 3 +++
+ hw/kdrive/src/kinput.c | 12 ++++++++++++
+ 3 files changed, 61 insertions(+), 1 deletion(-)
+
+Index: xorg-server-1.1.99.3/Xext/xcalibrate.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/Xext/xcalibrate.c 2007-06-30 16:27:13.000000000 +0100
++++ xorg-server-1.1.99.3/Xext/xcalibrate.c 2007-06-30 16:27:15.000000000 +0100
+@@ -166,7 +166,6 @@ ProcXCalibrateSetRawMode (ClientPtr clie
+ return (client->noClientException);
+ }
+
+-
+ static int
+ SProcXCalibrateSetRawMode (ClientPtr client)
+ {
+@@ -180,6 +179,47 @@ SProcXCalibrateSetRawMode (ClientPtr cli
+ return ProcXCalibrateSetRawMode(client);
+ }
+
++static int
++ProcXCalibrateScreenToCoord (ClientPtr client)
++{
++ REQUEST(xXCalibrateScreenToCoordReq);
++ xXCalibrateScreenToCoordReply rep;
++
++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq);
++
++ memset (&rep, 0, sizeof (rep));
++ rep.type = X_Reply;
++ rep.sequenceNumber = client->sequence;
++ rep.x = stuff->x;
++ rep.y = stuff->y;
++
++ KdScreenToMouseCoords(&rep.x, &rep.y);
++
++ if (client->swapped)
++ {
++ int n;
++
++ swaps (&rep.x, n);
++ swaps (&rep.y, n);
++ }
++ WriteToClient(client, sizeof (rep), (char *) &rep);
++ return (client->noClientException);
++}
++
++static int
++SProcXCalibrateScreenToCoord (ClientPtr client)
++{
++ REQUEST(xXCalibrateScreenToCoordReq);
++ int n;
++
++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq);
++
++ swaps(&stuff->x, n);
++ swaps(&stuff->y, n);
++
++ return ProcXCalibrateScreenToCoord(client);
++}
++
+ static void
+ XCalibrateResetProc (ExtensionEntry *extEntry)
+ {
+@@ -194,6 +234,9 @@ ProcXCalibrateDispatch (ClientPtr client
+ return ProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return ProcXCalibrateSetRawMode(client);
++ case X_XCalibrateScreenToCoord:
++ return ProcXCalibrateScreenToCoord(client);
++
+ default: break;
+ }
+
+@@ -213,6 +256,8 @@ SProcXCalibrateDispatch (ClientPtr clien
+ return SProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return SProcXCalibrateSetRawMode(client);
++ case X_XCalibrateScreenToCoord:
++ return SProcXCalibrateScreenToCoord(client);
+
+ default: break;
+ }
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.h 2007-06-30 16:27:13.000000000 +0100
++++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h 2007-06-30 16:30:40.000000000 +0100
+@@ -851,6 +851,9 @@ void
+ KdSetPointerMatrix (KdPointerMatrix *pointer);
+
+ void
++KdScreenToMouseCoords (int *x, int *y);
++
++void
+ KdComputePointerMatrix (KdPointerMatrix *pointer, Rotation randr, int width, int height);
+
+ void
+Index: xorg-server-1.1.99.3/hw/kdrive/src/kinput.c
+===================================================================
+--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kinput.c 2007-06-30 16:27:14.000000000 +0100
++++ xorg-server-1.1.99.3/hw/kdrive/src/kinput.c 2007-06-30 16:30:16.000000000 +0100
+@@ -570,6 +570,18 @@ KdSetPointerMatrix (KdPointerMatrix *mat
+ }
+
+ void
++KdScreenToMouseCoords (int *x, int *y)
++{
++ int (*m)[3] = kdPointerMatrix.matrix;
++ int div = m[0][1] * m[1][0] - m[1][1] * m[0][0];
++ int sx = *x;
++ int sy = *y;
++
++ *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div;
++ *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div;
++}
++
++void
+ KdComputePointerMatrix (KdPointerMatrix *m, Rotation randr, int width,
+ int height)
+ {