diff options
author | Jonathan David <jonathan.david@ni.com> | 2015-11-30 15:59:50 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-28 09:25:19 +0000 |
commit | 8dd27efecf3f156e4013b41e33d9bfcd4126024c (patch) | |
tree | 67e64642b58f21804924c8a2533104c068ba802c /meta/recipes-graphics | |
parent | e8d36f4886e88cc496b04890055fbc534c3caa6f (diff) | |
download | poky-8dd27efecf3f156e4013b41e33d9bfcd4126024c.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
(From OE-Core rev: ce6f15dc3905ab0b061b20cc35fd179fdd9e070f)
Signed-off-by: Jonathan David <jonathan.david@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r-- | meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch | 33 | ||||
-rw-r--r-- | meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb | 3 |
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 @@ | |||
1 | Upstream-Status: Inappropriate [no longer maintained] | ||
2 | |||
3 | From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001 | ||
4 | From: Jonathan David <jonathan.david@ni.com> | ||
5 | Date: Mon, 30 Nov 2015 12:12:20 -0600 | ||
6 | Subject: [PATCH] add geometry input when calibrating | ||
7 | |||
8 | Send monitor geometry to xinput_calibrator when running the script | ||
9 | |||
10 | Signed-off-by: Jonathan David <jonathan.david@ni.com> | ||
11 | --- | ||
12 | scripts/xinput_calibrator_pointercal.sh | 5 ++++- | ||
13 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh | ||
16 | index 0ada7da..6a3aded 100755 | ||
17 | --- a/scripts/xinput_calibrator_pointercal.sh | ||
18 | +++ b/scripts/xinput_calibrator_pointercal.sh | ||
19 | @@ -37,7 +37,10 @@ done | ||
20 | |||
21 | [ "$USER" != "root" ] && CALFILE=$USER_CALFILE | ||
22 | |||
23 | -CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'` | ||
24 | +read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \ | ||
25 | + { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }') | ||
26 | + | ||
27 | +CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'` | ||
28 | if [ ! -z "$CALDATA" ] ; then | ||
29 | echo $CALDATA > $CALFILE | ||
30 | echo "Calibration data stored in $CALFILE (log in $LOGFILE)" | ||
31 | -- | ||
32 | 1.9.1 | ||
33 | |||
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" | |||
14 | SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111" | 14 | SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111" |
15 | SRC_URI = "git://github.com/tias/xinput_calibrator.git \ | 15 | SRC_URI = "git://github.com/tias/xinput_calibrator.git \ |
16 | file://30xinput_calibrate.sh \ | 16 | file://30xinput_calibrate.sh \ |
17 | file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch" | 17 | file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \ |
18 | file://add-geometry-input-when-calibrating.patch" | ||
18 | 19 | ||
19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
20 | 21 | ||