summaryrefslogtreecommitdiff
path: root/meta/packages/xorg-xserver
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-06-30 15:27:45 +0000
committerRichard Purdie <richard@openedhand.com>2007-06-30 15:27:45 +0000
commita863497347198c0c6968ff02148ac766085d6d12 (patch)
treed19660610a8aff5d0b9cf65c58df46884647bbcb /meta/packages/xorg-xserver
parentd5ba636e35b3f8ef200dae9c1450146f00699ebe (diff)
downloadopenembedded-core-a863497347198c0c6968ff02148ac766085d6d12.tar.gz
openembedded-core-a863497347198c0c6968ff02148ac766085d6d12.tar.bz2
openembedded-core-a863497347198c0c6968ff02148ac766085d6d12.tar.xz
openembedded-core-a863497347198c0c6968ff02148ac766085d6d12.zip
X calibration changes. Add functionality to the xcalibrate protocol (and X) to convert screen coordinates to mouse coordinates. xtscal can then be massively simplified removing a stack of bugs. Also remove stale cvs versions of xcalibrate.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2067 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/xorg-xserver')
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch122
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch13
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch122
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb7
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb5
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb2
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive_git.bb2
7 files changed, 253 insertions, 20 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch
new file mode 100644
index 000000000..e0cca5428
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-1.3.0.0/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.3.0.0/Xext/xcalibrate.c
+===================================================================
+--- xorg-server-1.3.0.0.orig/Xext/xcalibrate.c 2007-06-29 17:30:03.000000000 +0100
++++ xorg-server-1.3.0.0/Xext/xcalibrate.c 2007-06-30 14:04:40.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.3.0.0/hw/kdrive/src/kdrive.h
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kdrive.h 2007-06-30 13:43:45.000000000 +0100
++++ xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h 2007-06-30 13:45:03.000000000 +0100
+@@ -746,6 +746,9 @@ void
+ KdSetMouseMatrix (KdMouseMatrix *matrix);
+
+ void
++KdScreenToMouseCoords (int *x, int *y);
++
++void
+ KdComputeMouseMatrix (KdMouseMatrix *matrix, Rotation randr, int width, int height);
+
+ void
+Index: xorg-server-1.3.0.0/hw/kdrive/src/kinput.c
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kinput.c 2007-06-29 17:30:16.000000000 +0100
++++ xorg-server-1.3.0.0/hw/kdrive/src/kinput.c 2007-06-30 15:52:16.000000000 +0100
+@@ -381,6 +381,18 @@ KdSetMouseMatrix (KdMouseMatrix *matrix)
+ }
+
+ void
++KdScreenToMouseCoords (int *x, int *y)
++{
++ int (*m)[3] = kdMouseMatrix.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
+ KdComputeMouseMatrix (KdMouseMatrix *m, Rotation randr, int width, int height)
+ {
+ int x_dir = 1, y_dir = 1;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
index df5bbe2ab..c5997c2ff 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
+++ b/meta/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/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch
new file mode 100644
index 000000000..fbe89b16b
--- /dev/null
+++ b/meta/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)
+ {
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb b/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb
index 683fbc606..2ca4fab50 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap_X11R7.1-1.1.99.3.bb
@@ -1,5 +1,5 @@
LICENSE = "MIT"
-DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto xpext xsp libxkbfile dbus"
+DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto xpext xsp libxkbfile dbus"
PROVIDES = "virtual/xserver"
PACKAGES =+ "xserver-kdrive-xomap"
@@ -7,7 +7,7 @@ SECTION = "x11/base"
DESCRIPTION = "X server from freedesktop.org"
DESCRIPTION_xserver-kdrive-xomap = "X server for the OMAP in the Nokia 800"
-PR = "r4"
+PR = "r5"
COMPATIBLE_MACHINE = "nokia(800|770)"
@@ -22,7 +22,8 @@ SRC_URI = "http://repository.maemo.org/pool/maemo3.1/free/source/xorg-server_1.1
file://xcalibrate.patch;patch=1 \
file://fixups.patch;patch=1 \
file://button_only.patch;patch=1 \
- file://calibrateext.patch;patch=1"
+ file://calibrateext.patch;patch=1 \
+ file://xcalibrate_coords.patch;patch=1"
# file://kdrive-evdev.patch;patch=1 \
# file://kdrive-use-evdev.patch;patch=1 \
# file://optional-xkb.patch;patch=1 \
diff --git a/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
index a10690416..6982bccb8 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
@@ -3,12 +3,13 @@ require xserver-kdrive-common.inc
DEPENDS += "libxkbfile libxcalibrate"
PE = "1"
-PR = "r11"
+PR = "r12"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
${KDRIVE_COMMON_PATCHES} \
file://fix_default_mode.patch;patch=1 \
file://enable-xcalibrate.patch;patch=1 \
- file://hide-cursor-and-ppm-root.patch;patch=1"
+ file://hide-cursor-and-ppm-root.patch;patch=1 \
+ file://xcalibrate_coords.patch;patch=1"
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb b/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
index 1182d7d44..053c0abf0 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
@@ -1,5 +1,5 @@
LICENSE = "MIT"
-DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto"
+DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto"
PROVIDES = "virtual/xserver"
# RPROVIDES = "virtual/xserver"
diff --git a/meta/packages/xorg-xserver/xserver-kdrive_git.bb b/meta/packages/xorg-xserver/xserver-kdrive_git.bb
index 491e486b3..74323cd32 100644
--- a/meta/packages/xorg-xserver/xserver-kdrive_git.bb
+++ b/meta/packages/xorg-xserver/xserver-kdrive_git.bb
@@ -2,7 +2,7 @@ PV = "1.1.0+git${SRCDATE}"
DEFAULT_PREFERENCE = "-2"
LICENSE = "MIT"
-DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto"
+DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto"
PROVIDES = "virtual/xserver"
RPROVIDES = "virtual/xserver"