summaryrefslogtreecommitdiffstats
path: root/meta/packages/xorg-lib
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-lib
parentd5ba636e35b3f8ef200dae9c1450146f00699ebe (diff)
downloadpoky-a863497347198c0c6968ff02148ac766085d6d12.tar.gz
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-lib')
-rw-r--r--meta/packages/xorg-lib/libxcalibrate/coords.patch50
-rw-r--r--meta/packages/xorg-lib/libxcalibrate_git.bb4
2 files changed, 53 insertions, 1 deletions
diff --git a/meta/packages/xorg-lib/libxcalibrate/coords.patch b/meta/packages/xorg-lib/libxcalibrate/coords.patch
new file mode 100644
index 0000000000..19cf1639f6
--- /dev/null
+++ b/meta/packages/xorg-lib/libxcalibrate/coords.patch
@@ -0,0 +1,50 @@
1---
2 xcalibrate.c | 26 ++++++++++++++++++++++++++
3 xcalibrate.h | 2 ++
4 2 files changed, 28 insertions(+)
5
6Index: XCalibrate/xcalibrate.c
7===================================================================
8--- XCalibrate.orig/xcalibrate.c 2007-06-30 14:12:22.000000000 +0100
9+++ XCalibrate/xcalibrate.c 2007-06-30 14:18:10.000000000 +0100
10@@ -227,3 +227,29 @@ XCalibrateSetRawMode (Display *dpy, Bool
11 SyncHandle ();
12 return 0;
13 }
14+
15+Status
16+XCalibrateScreenToCoord (Display *dpy, int *x, int *y)
17+{
18+ XExtDisplayInfo *info = XCalibrateFindDisplay (dpy);
19+ xXCalibrateScreenToCoordReq *req;
20+ xXCalibrateScreenToCoordReply rep;
21+ LockDisplay (dpy);
22+ GetReq (XCalibrateScreenToCoord, req);
23+ req->reqType = info->codes->major_opcode;
24+ req->xCalibrateReqType = X_XCalibrateScreenToCoord;
25+ req->x = *x;
26+ req->y = *y;
27+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
28+ {
29+ UnlockDisplay (dpy);
30+ SyncHandle ();
31+ return 1;
32+ }
33+ *x = rep.x;
34+ *y = rep.y;
35+ UnlockDisplay (dpy);
36+ SyncHandle ();
37+ return 0;
38+}
39+
40Index: XCalibrate/xcalibrate.h
41===================================================================
42--- XCalibrate.orig/xcalibrate.h 2007-06-30 14:16:16.000000000 +0100
43+++ XCalibrate/xcalibrate.h 2007-06-30 14:16:38.000000000 +0100
44@@ -43,4 +43,6 @@ Status XCalibrateQueryVersion (Display *
45
46 Status XCalibrateSetRawMode (Display *dpy, Bool enable);
47
48+Status XCalibrateScreenToCoord (Display *dpy, int *x, int *y);
49+
50 #endif
diff --git a/meta/packages/xorg-lib/libxcalibrate_git.bb b/meta/packages/xorg-lib/libxcalibrate_git.bb
index e4df6a1cbf..aa4b77b39d 100644
--- a/meta/packages/xorg-lib/libxcalibrate_git.bb
+++ b/meta/packages/xorg-lib/libxcalibrate_git.bb
@@ -4,12 +4,14 @@ PRIORITY = "optional"
4LICENSE = "BSD-X" 4LICENSE = "BSD-X"
5 5
6PV = "0.0+git${SRCDATE}" 6PV = "0.0+git${SRCDATE}"
7PR = "r1"
7 8
8DEPENDS = "virtual/libx11 calibrateproto libxext" 9DEPENDS = "virtual/libx11 calibrateproto libxext"
9 10
10FILES_${PN}-locale += "${datadir}/X11/locale" 11FILES_${PN}-locale += "${datadir}/X11/locale"
11 12
12SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate;protocol=git;tag=4be232e30cd33a44a1ce6d3ec429ee6101540c62" 13SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/libXCalibrate;protocol=git;tag=4be232e30cd33a44a1ce6d3ec429ee6101540c62 \
14 file://coords.patch;patch=1"
13S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
14 16
15inherit autotools pkgconfig 17inherit autotools pkgconfig