From a863497347198c0c6968ff02148ac766085d6d12 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 30 Jun 2007 15:27:45 +0000 Subject: 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 --- meta/packages/xorg-lib/libxcalibrate/coords.patch | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 meta/packages/xorg-lib/libxcalibrate/coords.patch (limited to 'meta/packages/xorg-lib/libxcalibrate') diff --git a/meta/packages/xorg-lib/libxcalibrate/coords.patch b/meta/packages/xorg-lib/libxcalibrate/coords.patch new file mode 100644 index 000000000..19cf1639f --- /dev/null +++ b/meta/packages/xorg-lib/libxcalibrate/coords.patch @@ -0,0 +1,50 @@ +--- + xcalibrate.c | 26 ++++++++++++++++++++++++++ + xcalibrate.h | 2 ++ + 2 files changed, 28 insertions(+) + +Index: XCalibrate/xcalibrate.c +=================================================================== +--- XCalibrate.orig/xcalibrate.c 2007-06-30 14:12:22.000000000 +0100 ++++ XCalibrate/xcalibrate.c 2007-06-30 14:18:10.000000000 +0100 +@@ -227,3 +227,29 @@ XCalibrateSetRawMode (Display *dpy, Bool + SyncHandle (); + return 0; + } ++ ++Status ++XCalibrateScreenToCoord (Display *dpy, int *x, int *y) ++{ ++ XExtDisplayInfo *info = XCalibrateFindDisplay (dpy); ++ xXCalibrateScreenToCoordReq *req; ++ xXCalibrateScreenToCoordReply rep; ++ LockDisplay (dpy); ++ GetReq (XCalibrateScreenToCoord, req); ++ req->reqType = info->codes->major_opcode; ++ req->xCalibrateReqType = X_XCalibrateScreenToCoord; ++ req->x = *x; ++ req->y = *y; ++ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) ++ { ++ UnlockDisplay (dpy); ++ SyncHandle (); ++ return 1; ++ } ++ *x = rep.x; ++ *y = rep.y; ++ UnlockDisplay (dpy); ++ SyncHandle (); ++ return 0; ++} ++ +Index: XCalibrate/xcalibrate.h +=================================================================== +--- XCalibrate.orig/xcalibrate.h 2007-06-30 14:16:16.000000000 +0100 ++++ XCalibrate/xcalibrate.h 2007-06-30 14:16:38.000000000 +0100 +@@ -43,4 +43,6 @@ Status XCalibrateQueryVersion (Display * + + Status XCalibrateSetRawMode (Display *dpy, Bool enable); + ++Status XCalibrateScreenToCoord (Display *dpy, int *x, int *y); ++ + #endif -- cgit v1.2.3