aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan David <jonathan.david@ni.com>2015-11-30 15:59:50 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-27 11:27:01 +0000
commitce6f15dc3905ab0b061b20cc35fd179fdd9e070f (patch)
tree8a69ed30fe55546b4b435b0885e864120f9b33ab
parent0bf9d919bba5780d34cc6ac9dde2c74bb07b8342 (diff)
downloadopenembedded-core-contrib-ce6f15dc3905ab0b061b20cc35fd179fdd9e070f.tar.gz
xinput-calibrator: get screen geometry when calibrating
Calibration acquires a default resolution of 1280x1024 when running xinput_calibrator_pointercal.sh, obtain correct screen resolution by using xrandr to grab user-specified geometry and pass to script Signed-off-by: Jonathan David <jonathan.david@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch33
-rw-r--r--meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb3
2 files changed, 35 insertions, 1 deletions
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
new file mode 100644
index 0000000000..9351331be8
--- /dev/null
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [no longer maintained]
+
+From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001
+From: Jonathan David <jonathan.david@ni.com>
+Date: Mon, 30 Nov 2015 12:12:20 -0600
+Subject: [PATCH] add geometry input when calibrating
+
+Send monitor geometry to xinput_calibrator when running the script
+
+Signed-off-by: Jonathan David <jonathan.david@ni.com>
+---
+ scripts/xinput_calibrator_pointercal.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
+index 0ada7da..6a3aded 100755
+--- a/scripts/xinput_calibrator_pointercal.sh
++++ b/scripts/xinput_calibrator_pointercal.sh
+@@ -37,7 +37,10 @@ done
+
+ [ "$USER" != "root" ] && CALFILE=$USER_CALFILE
+
+-CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
++read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \
++ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
++
++CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
+ if [ ! -z "$CALDATA" ] ; then
+ echo $CALDATA > $CALFILE
+ echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
+--
+1.9.1
+
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index a9de3d7ef2..ac5b70cba4 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -14,7 +14,8 @@ REQUIRED_DISTRO_FEATURES = "x11"
SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
SRC_URI = "git://github.com/tias/xinput_calibrator.git \
file://30xinput_calibrate.sh \
- file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch"
+ file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
+ file://add-geometry-input-when-calibrating.patch"
S = "${WORKDIR}/git"