Skip to contentSkip to conversation

xinput-calibrator rework

PATCH In review Andreas Müller 3 participants 16 messages Feb 5, 2013 – Feb 14, 2013

lore
Share & tools
lore
#0 lore raw

cover xinput-calibrator rework

* Implemented are 3 modes of invocation:
1. udev/systemd
2. /etc/xdg/autostart
3. manual
1/2 are selected upon DISTRO_FEATURES containing systemd or not

* The calibration is stored in /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for multiple touchsceen devices is prepared.

* The script detects upon parameter information how it was called and waits for xserver to come up / detect connected touchsceen devices. If no matching calibration file is found, the xinput_calibrator is called for this device. For systemd invocation the default display is choosen.

* For manual invocation and multiple touchscreen devices attached, the operator can select which device to calibrate interactively.

* Multiple touchscreen support is prepared - the following open issues are known:
* Multiple touchscreens with same device name will get same calibration values. An unique device identifier could not be found yet.
* systemd startup with multiple device cause multiple instances of xinput_calibrator being started without information for which device the calibration is performed.

* Many many tests were performed:
2 automatic invocation types * (1st + 2nd startup) * (0, 1, 2 touchscreens)

* Other layers need alignment for pointercal removement. If accepted I can take care (this is NOT an extortion :)

The following changes since commit 4128325a4c87bcde6ac6ffe5dbf5d6d057ee4804:

nodejs: export DESTDIR to fix build with dash (2013-02-05 11:05:51 +0100)

are available in the git repository at:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded.git xinput-calibrator

Andreas Müller (5):
xinput-calibrator: update to latest git commit
xinput-calibrator: Add --output-filename to store calibration to file
xinput-calibrator: rework
pointercal-xinput: remove
xinput-calibrator: do not RDEPEND xterm

 .../pointercal-xinput/pointercal.xinput            |    1 -
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 --
 ...er-output-filename-and-store-in-output_fi.patch |  248 ++++++++++++++++++++
 ...vent-timeout-exit-when-no-timeout-is-used.patch |   82 +++++++
 ...vdev-do-write-calibration-results-if-outp.patch |  164 +++++++++++++
 ...orgPrint-do-write-calibration-results-if-.patch |  156 ++++++++++++
 ...sbtouchscreen-overridde-default-file-name.patch |   50 ++++
 ...librator-destructors-virtual-to-fix-warni.patch |   64 +++++
 ...er-size-for-max-line-length-only-once-in-.patch |   77 ++++++
 .../99-xf86-xinput-calibrator.rules                |    6 +
 .../xinput-calibrator/[email protected]   |    8 +
 .../xinput_calibrator_pointercal2.sh               |  151 ++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |   52 ++++-
 .../xinput-calibrator/xinput-calibrator.service    |   11 -
 .../xinput-calibrator_git.bbappend                 |   10 -
 15 files changed, 1046 insertions(+), 53 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/[email protected]
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH 1/5 xinput-calibrator: update to latest git commit

A new option --no-timeout was introduced. Unfortunately it is not working as expected and has to be fixed.

---
 ...vent-timeout-exit-when-no-timeout-is-used.patch |   82 ++++++++++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |    7 +-
 2 files changed, 87 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch new file +82 -0
new file mode 100644
index 0000000..4cd29a6
@@ -0,0 +1,82 @@
+From 5d404f02bfb9c6eabbbe93dea2a8eb7ed4fd07d6 Mon Sep 17 00:00:00 2001
+From: Jeff Lasslett <[email protected]>
+Date: Wed, 9 Jan 2013 14:12:46 +1100
+Subject: [PATCH] Prevent timeout exit when --no-timeout is used
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/45]
+
+---
+ src/gui/gtkmm.cpp |   30 ++++++++++++++++--------------
+ src/gui/x11.cpp   |   13 +++++++------
+ 2 files changed, 23 insertions(+), 20 deletions(-)
+
+diff --git a/src/gui/gtkmm.cpp b/src/gui/gtkmm.cpp
+index 32bb889..2f52e25 100644
+--- a/src/gui/gtkmm.cpp
++++ b/src/gui/gtkmm.cpp
+@@ -204,21 +204,23 @@ void CalibrationArea::redraw()
+ 
+ bool CalibrationArea::on_timer_signal()
+ {
+-    time_elapsed += time_step;
+-    if (time_elapsed > max_time) {
+-        exit(0);
+-    }
+-
+-    // Update clock
+-    Glib::RefPtr<Gdk::Window> win = get_window();
+-    if (win) {
+-        const Gdk::Rectangle rect(display_width/2 - clock_radius - clock_line_width,
+-                                 display_height/2 - clock_radius - clock_line_width,
+-                                 2 * clock_radius + 1 + 2 * clock_line_width,
+-                                 2 * clock_radius + 1 + 2 * clock_line_width);
+-        win->invalidate_rect(rect, false);
++    if (calibrator->get_use_timeout()) {
++        time_elapsed += time_step;
++        if (time_elapsed > max_time) {
++            exit(0);
++        }
++    
++        // Update clock
++        Glib::RefPtr<Gdk::Window> win = get_window();
++        if (win) {
++            const Gdk::Rectangle rect(display_width/2 - clock_radius - clock_line_width,
++                                     display_height/2 - clock_radius - clock_line_width,
++                                     2 * clock_radius + 1 + 2 * clock_line_width,
++                                     2 * clock_radius + 1 + 2 * clock_line_width);
++            win->invalidate_rect(rect, false);
++        }
+     }
+-
++    
+     return true;
+ }
+ 
+diff --git a/src/gui/x11.cpp b/src/gui/x11.cpp
+index db8a8a5..dfcd9fd 100644
+--- a/src/gui/x11.cpp
++++ b/src/gui/x11.cpp
+@@ -293,13 +293,14 @@ bool GuiCalibratorX11::on_expose_event()
+ 
+ bool GuiCalibratorX11::on_timer_signal()
+ {
+-    time_elapsed += time_step;
+-    if (time_elapsed > max_time) {
+-        exit(0);
+-    }
+-
+     // Update clock
+-    if(calibrator->get_use_timeout()){
++    if(calibrator->get_use_timeout()) {
++
++        time_elapsed += time_step;
++        if (time_elapsed > max_time) {
++            exit(0);
++        }
++
+         XSetForeground(display, gc, pixel[BLACK]);
+         XSetLineAttributes(display, gc, clock_line_width,
+                     LineSolid, CapButt, JoinMiter);
+-- 
+1.7.4.4
+
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +5 -2
index 97f9343..b71daeb 100644
@@ -9,8 +9,11 @@ PR = "r1"
 
 inherit autotools
 
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
-SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git"
+SRCREV = "e02de96acbe2fa5a57b0bda6821a053b1b123fd2"
+SRC_URI = " \
+    git://github.com/tias/xinput_calibrator.git;protocol=git \
+    file://0001-Prevent-timeout-exit-when-no-timeout-is-used.patch \
+"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.7.6.5
#2 lore raw

PATCH 2/5 xinput-calibrator: Add --output-filename to store calibration to file

In reply to Andreas Müller
---
 ...er-output-filename-and-store-in-output_fi.patch |  248 ++++++++++++++++++++
 ...vdev-do-write-calibration-results-if-outp.patch |  164 +++++++++++++
 ...orgPrint-do-write-calibration-results-if-.patch |  156 ++++++++++++
 ...sbtouchscreen-overridde-default-file-name.patch |   50 ++++
 ...librator-destructors-virtual-to-fix-warni.patch |   64 +++++
 ...er-size-for-max-line-length-only-once-in-.patch |   77 ++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |    8 +-
 7 files changed, 766 insertions(+), 1 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch new file +248 -0
new file mode 100644
index 0000000..319a504
@@ -0,0 +1,248 @@
+From 6d79af03c09ba84ed718da5a3bb76f0bd5d13600 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Mon, 21 Jan 2013 12:31:12 +0100
+Subject: [PATCH 1/6] Add parameter --output-filename and store in
+ output_filename
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <[email protected]>
+---
+ src/calibrator.cpp                |    5 +++--
+ src/calibrator.hh                 |   10 +++++++++-
+ src/calibrator/Evdev.cpp          |   10 ++++++----
+ src/calibrator/Evdev.hpp          |    6 ++++--
+ src/calibrator/Usbtouchscreen.cpp |    4 ++--
+ src/calibrator/Usbtouchscreen.hpp |    2 +-
+ src/calibrator/XorgPrint.cpp      |    4 ++--
+ src/calibrator/XorgPrint.hpp      |    2 +-
+ src/main_common.cpp               |   16 +++++++++++++---
+ 9 files changed, 41 insertions(+), 18 deletions(-)
+
+diff --git a/src/calibrator.cpp b/src/calibrator.cpp
+index 403ae8e..ae5ea86 100644
+--- a/src/calibrator.cpp
++++ b/src/calibrator.cpp
+@@ -37,10 +37,11 @@ bool Calibrator::verbose = false;
+ Calibrator::Calibrator(const char* const device_name0, const XYinfo& axys0,
+     const int thr_misclick, const int thr_doubleclick,
+     const OutputType output_type0, const char* geometry0,
+-    const bool use_timeout0)
++    const bool use_timeout0, const char* output_filename0)
+ : device_name(device_name0),
+     threshold_doubleclick(thr_doubleclick), threshold_misclick(thr_misclick),
+-    output_type(output_type0), geometry(geometry0), use_timeout(use_timeout0)
++    output_type(output_type0), geometry(geometry0), use_timeout(use_timeout0),
++    output_filename(output_filename0)
+ {
+     old_axys = axys0;
+ 
+diff --git a/src/calibrator.hh b/src/calibrator.hh
+index 96cff2b..7d406b4 100644
+--- a/src/calibrator.hh
++++ b/src/calibrator.hh
+@@ -145,7 +145,8 @@ public:
+                const int thr_doubleclick=0,
+                const OutputType output_type=OUTYPE_AUTO,
+                const char* geometry=0,
+-               const bool use_timeout=1);
++               const bool use_timeout=1,
++               const char* output_filename = 0);
+ 
+     ~Calibrator() {}
+ 
+@@ -180,6 +181,10 @@ public:
+     const bool get_use_timeout() const
+     { return use_timeout; }
+ 
++    /// get output filename set at cmdline or NULL
++    const char* get_output_filename() const
++    { return output_filename; }
++
+ protected:
+     /// check whether the coordinates are along the respective axis
+     bool along_axis(int xy, int x0, int y0);
+@@ -230,6 +235,9 @@ protected:
+     const char* geometry;
+ 
+     const bool use_timeout;
++
++    // manually specified output filename
++    const char* output_filename;
+ };
+ 
+ // Interfance for a CalibratorTester
+diff --git a/src/calibrator/Evdev.cpp b/src/calibrator/Evdev.cpp
+index a370689..413e314 100644
+--- a/src/calibrator/Evdev.cpp
++++ b/src/calibrator/Evdev.cpp
+@@ -47,8 +47,9 @@ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const int thr_doubleclick,
+                                  const OutputType output_type,
+                                  const char* geometry,
+-                                 const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++                                 const bool use_timeout,
++                                 const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     // init
+     display = XOpenDisplay(NULL);
+@@ -166,8 +167,9 @@ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const int thr_doubleclick,
+                                  const OutputType output_type,
+                                  const char* geometry,
+-                                 const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry) { }
++                                 const bool use_timeout,
++                                 const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, output_filename) { }
+ 
+ // Destructor
+ CalibratorEvdev::~CalibratorEvdev () {
+diff --git a/src/calibrator/Evdev.hpp b/src/calibrator/Evdev.hpp
+index c586ba2..53e7277 100644
+--- a/src/calibrator/Evdev.hpp
++++ b/src/calibrator/Evdev.hpp
+@@ -47,7 +47,8 @@ protected:
+                     const int thr_doubleclick=0,
+                     const OutputType output_type=OUTYPE_AUTO,
+                     const char* geometry=0,
+-                    const bool use_timeout=false);
++                    const bool use_timeout=false,
++                    const char* output_filename = 0);
+ 
+ public:
+     CalibratorEvdev(const char* const device_name,
+@@ -57,7 +58,8 @@ public:
+                     const int thr_doubleclick=0,
+                     const OutputType output_type=OUTYPE_AUTO,
+                     const char* geometry=0,
+-                    const bool use_timeout=false);
++                    const bool use_timeout=false,
++                    const char* output_filename = 0);
+     ~CalibratorEvdev();
+ 
+     /// calculate and apply the calibration
+diff --git a/src/calibrator/Usbtouchscreen.cpp b/src/calibrator/Usbtouchscreen.cpp
+index c9fc20a..6ec71fd 100644
+--- a/src/calibrator/Usbtouchscreen.cpp
++++ b/src/calibrator/Usbtouchscreen.cpp
+@@ -48,8 +48,8 @@ static const char *p_flip_x = "flip_x";
+ static const char *p_flip_y = "flip_y";
+ static const char *p_swap_xy = "swap_xy";
+ 
+-CalibratorUsbtouchscreen::CalibratorUsbtouchscreen(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++CalibratorUsbtouchscreen::CalibratorUsbtouchscreen(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     if (strcmp(device_name, "Usbtouchscreen") != 0)
+         throw WrongCalibratorException("Not a usbtouchscreen device");
+diff --git a/src/calibrator/Usbtouchscreen.hpp b/src/calibrator/Usbtouchscreen.hpp
+index 94473a3..4d84962 100644
+--- a/src/calibrator/Usbtouchscreen.hpp
++++ b/src/calibrator/Usbtouchscreen.hpp
+@@ -35,7 +35,7 @@ public:
+     CalibratorUsbtouchscreen(const char* const device_name, const XYinfo& axys,
+          const int thr_misclick=0, const int thr_doubleclick=0,
+         const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
+-        const bool use_timeout=false);
++        const bool use_timeout=false, const char* output_filename = 0);
+     ~CalibratorUsbtouchscreen();
+ 
+     virtual bool finish_data(const XYinfo new_axys);
+diff --git a/src/calibrator/XorgPrint.cpp b/src/calibrator/XorgPrint.cpp
+index 8e3a1b3..3dcb7ae 100644
+--- a/src/calibrator/XorgPrint.cpp
++++ b/src/calibrator/XorgPrint.cpp
+@@ -24,8 +24,8 @@
+ 
+ #include <cstdio>
+ 
+-CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     printf("Calibrating standard Xorg driver \"%s\"\n", device_name);
+     printf("\tcurrent calibration values: min_x=%d, max_x=%d and min_y=%d, max_y=%d\n",
+diff --git a/src/calibrator/XorgPrint.hpp b/src/calibrator/XorgPrint.hpp
+index 7afbd9f..0d7e4cf 100644
+--- a/src/calibrator/XorgPrint.hpp
++++ b/src/calibrator/XorgPrint.hpp
+@@ -35,7 +35,7 @@ public:
+     CalibratorXorgPrint(const char* const device_name, const XYinfo& axys,
+         const int thr_misclick=0, const int thr_doubleclick=0,
+         const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
+-        const bool use_timeout=false);
++        const bool use_timeout=false, const char* output_filename = 0);
+ 
+     virtual bool finish_data(const XYinfo new_axys);
+ 
+diff --git a/src/main_common.cpp b/src/main_common.cpp
+index f840e3d..efaa718 100644
+--- a/src/main_common.cpp
++++ b/src/main_common.cpp
+@@ -180,6 +180,7 @@ static void usage(char* cmd, unsigned thr_misclick)
+     fprintf(stderr, "\t--fake: emulate a fake device (for testing purposes)\n");
+     fprintf(stderr, "\t--geometry: manually provide the geometry (width and height) for the calibration window\n");
+     fprintf(stderr, "\t--no-timeout: turns off the timeout\n");
++    fprintf(stderr, "\t--output-filename: write calibration data to file (USB: override default /etc/modprobe.conf.local\n");
+ }
+ 
+ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+@@ -191,6 +192,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     XYinfo pre_axys;
+     const char* pre_device = NULL;
+     const char* geometry = NULL;
++    const char* output_filename = NULL;
+     unsigned thr_misclick = 15;
+     unsigned thr_doubleclick = 7;
+     OutputType output_type = OUTYPE_AUTO;
+@@ -289,6 +291,11 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+             // Disable timeout
+ 			if (strcmp("--no-timeout", argv[i]) == 0) {
+ 				use_timeout = false;
++			} else
++
++			// Output file
++			if (strcmp("--output-filename", argv[i]) == 0) {
++				output_filename = argv[++i];
+ 			}
+ 
+             // unknown option
+@@ -363,7 +370,8 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     try {
+         // try Usbtouchscreen driver
+         return new CalibratorUsbtouchscreen(device_name, device_axys,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ 
+     } catch(WrongCalibratorException& x) {
+         if (verbose)
+@@ -373,7 +381,8 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     try {
+         // next, try Evdev driver (with XID)
+         return new CalibratorEvdev(device_name, device_axys, device_id,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ 
+     } catch(WrongCalibratorException& x) {
+         if (verbose)
+@@ -382,5 +391,6 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+ 
+     // lastly, presume a standard Xorg driver (evtouch, mutouch, ...)
+     return new CalibratorXorgPrint(device_name, device_axys,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ }
+-- 
+1.7.6.5
+
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch new file +164 -0

164 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch new file +156 -0

156 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch new file +50 -0

50 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch new file +64 -0

64 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch new file +77 -0

77 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +7 -1
index b71daeb..6781e86 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r1"
+PR = "r2"
 
 inherit autotools
 
@@ -13,6 +13,12 @@ SRCREV = "e02de96acbe2fa5a57b0bda6821a053b1b123fd2"
 SRC_URI = " \
     git://github.com/tias/xinput_calibrator.git;protocol=git \
     file://0001-Prevent-timeout-exit-when-no-timeout-is-used.patch \
+    file://0001-Add-parameter-output-filename-and-store-in-output_fi.patch \
+    file://0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch \
+    file://0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch \
+    file://0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch \
+    file://0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch \
+    file://0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
1.7.6.5
#3 lore raw

PATCH 3/5 xinput-calibrator: rework

In reply to Andreas Müller

* poll xinput_calibrator to avoid touchscreen not yet detected by xserver
* handling for multiple touch devices prepared by storing device specific calibration in ${sysconfdir}/X11/xorg.conf.d/99-<device-name>.conf. By using conf files, xserver takes care and no call of xinput is required and the rdependency can be removed (tested).
* udev/systemd: plug/play / script is only called for devices with touchscreen connected
* fallback for non systemd systems with ${sysconfdir}/xdg/autostart. After once stored this fallback also works for display-managers not using ${sysconfdir}/xdg/autostart. Since the script is called on every user session, it is not called in an extra terminal window to avoid window flickering.
* follow oe-core's systemd switching upon DISTRO_FEATURES
* permanent recalibration for users with sufficient rights

---
 .../99-xf86-xinput-calibrator.rules                |    6 +
 .../xinput-calibrator/[email protected]   |    8 +
 .../xinput_calibrator_pointercal2.sh               |  151 ++++++++++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |   39 ++++--
 .../xinput-calibrator/xinput-calibrator.service    |   11 --
 .../xinput-calibrator_git.bbappend                 |   10 --
 6 files changed, 195 insertions(+), 30 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/[email protected]
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules new file +6 -0
new file mode 100644
index 0000000..d25a849
@@ -0,0 +1,6 @@
+ACTION!="add", GOTO=xinput_calibrator_end
+
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", TAG+="systemd", ENV{SYSTEMD_WANTS}="xinput-calibrator@%k.service"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", TAG+="systemd", ENV{SYSTEMD_WANTS}="xinput-calibrator@%k.service"
+
+LABEL="xinput_calibrator_end"
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/[email protected] new file +8 -0
new file mode 100644
index 0000000..839d868
@@ -0,0 +1,8 @@
+[Unit]
+Description=Xinput-calibration for %I
+After=graphical.target
+
+[Service]
+Type=simple
+TimeoutSec=0
+ExecStart=/bin/sh -c "exec /usr/bin/xinput_calibrator_pointercal2.sh %I 1>>/var/log/xinput-calibration.log 2>&1"
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh new file +151 -0

151 lines not on this page · raw message

meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +30 -9
index 6781e86..199ee34 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 inherit autotools
 
@@ -19,6 +19,9 @@ SRC_URI = " \
     file://0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch \
     file://0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch \
     file://0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch \
+    file://99-xf86-xinput-calibrator.rules \
+    file://[email protected] \
+    file://xinput_calibrator_pointercal2.sh \
 "
 
 S = "${WORKDIR}/git"
@@ -27,14 +30,32 @@ S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-gui=x11"
 
 do_install_append() {
-        install -d ${D}${bindir}
-        install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
-
-        install -d ${D}${sysconfdir}/xdg/autostart
-        sed -i -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' scripts/xinput_calibrator.desktop
-        install -m 0644 scripts/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart
+	install -d ${D}${bindir}
+	install -m 0755 ${WORKDIR}/xinput_calibrator_pointercal2.sh ${D}${bindir}
+	install -d ${D}/${sysconfdir}/X11/xorg.conf.d
+
+	# use our script to make calibration permanent (sufficiont rights assumed)
+	sed -i 	-e 's,^Exec=.*,Exec=${base_bindir}/sh -c '\''${bindir}/xinput_calibrator_pointercal2.sh; cat'\'',' \
+		${D}${datadir}/applications/xinput_calibrator.desktop
+
+	# udev/systemd start?
+	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system
+		install -d ${D}${base_libdir}/udev/rules.d
+		install -m 0644 ${WORKDIR}/99-xf86-xinput-calibrator.rules ${D}${base_libdir}/udev/rules.d
+	# ${sysconfdir}/xdg/autostart?
+	else
+	        install -d ${D}${sysconfdir}/xdg/autostart
+	        install -m 0644 ${D}${datadir}/applications/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart
+		# use our script to make calibration permanent (sufficiont rights assumed) / not in Terminal
+		# /var/log is not accessible for all users so use user's home
+	        sed -i 	-e 's,^Exec=.*,Exec=${base_bindir}/sh -c '\''${bindir}/xinput_calibrator_pointercal2.sh xdg-autostart 1>>$HOME/xinput-calibration.log 2>\&1'\'',' \
+			-e 's,^Terminal=true,Terminal=false,' \
+			${D}${sysconfdir}/xdg/autostart/xinput_calibrator.desktop
+	fi
 }
 
-FILES_${PN} += "${sysconfdir}/xdg/autostart"
-RDEPENDS_${PN} = "xinput xterm"
+FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
+RDEPENDS_${PN} = "xterm"
 RRECOMMENDS_${PN} = "pointercal-xinput"
meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service deleted +0 -11
deleted file mode 100644
index 2301876..0000000
@@ -1,11 +0,0 @@
-[Unit]
-Description=Loads xinput calibration data
-ConditionPathExists=/etc/pointercal.xinput
-Requires=display-manager.service
-After=display-manager.service
-
-[Service]
-ExecStart=/usr/bin/xinput_calibrator_once.sh
-
-[Install]
-WantedBy=multi-user.target
meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend deleted +0 -10
deleted file mode 100644
index 5bc5bc3..0000000
@@ -1,10 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PRINC := "${@int(PRINC) + 2}"
-
-inherit systemd
-
-SRC_URI += "file://xinput-calibrator.service"
-
-SYSTEMD_PACKAGES = "${PN}-systemd"
-SYSTEMD_SERVICE = "${PN}.service"
Signature · 1 line
1.7.6.5
#4 lore raw

PATCH 4/5 pointercal-xinput: remove

In reply to Andreas Müller

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After this is accepted patches to layers appending pointercal-xinput will be send.

---
 .../pointercal-xinput/pointercal.xinput            |    1 -
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 -------------------
 .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
 3 files changed, 1 insertions(+), 22 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput deleted +0 -1
deleted file mode 100644
index 9633fc5..0000000
@@ -1 +0,0 @@
-# replace with valid machine specific pointercal.xinput
meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb deleted +0 -19
deleted file mode 100644
index 9b68d54..0000000
@@ -1,19 +0,0 @@
-DESCRIPTION = "Touchscreen calibration data from xinput-calibrator"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PR = "r4"
-
-SRC_URI = "file://pointercal.xinput"
-S = "${WORKDIR}"
-
-do_install() {
-	# Only install file if it has a contents
-	if [ -s ${S}/pointercal.xinput ]; then
-	        install -d ${D}${sysconfdir}/
-	        install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/
-	fi
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput"
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +1 -2
index 199ee34..8ef774b 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r3"
+PR = "r4"
 
 inherit autotools
 
@@ -58,4 +58,3 @@ do_install_append() {
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
 RDEPENDS_${PN} = "xterm"
-RRECOMMENDS_${PN} = "pointercal-xinput"
Signature · 1 line
1.7.6.5
#5 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

Quoted 1 line · Andreas Müller

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After

So the plan to replace pointercal-xinput in BSP layers
is to convert pointercal.xinput files to 99-<device>.conf files provided by xserver-xf86-conf bbappend?

And do you have some script to convert them or do you convert them manually?

Regards,

Quoted 69 lines

this is accepted patches to layers appending pointercal-xinput will be send.

---
 .../pointercal-xinput/pointercal.xinput            |    1 -
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 -------------------
 .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
 3 files changed, 1 insertions(+), 22 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput deleted +0 -1
deleted file mode 100644
index 9633fc5..0000000
@@ -1 +0,0 @@
-# replace with valid machine specific pointercal.xinput
meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb deleted +0 -19
deleted file mode 100644
index 9b68d54..0000000
@@ -1,19 +0,0 @@
-DESCRIPTION = "Touchscreen calibration data from xinput-calibrator"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PR = "r4"
-
-SRC_URI = "file://pointercal.xinput"
-S = "${WORKDIR}"
-
-do_install() {
-	# Only install file if it has a contents
-	if [ -s ${S}/pointercal.xinput ]; then
-	        install -d ${D}${sysconfdir}/
-	        install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/
-	fi
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput"
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +1 -2
index 199ee34..8ef774b 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r3"
+PR = "r4"
 
 inherit autotools
 
@@ -58,4 +58,3 @@ do_install_append() {
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
 RDEPENDS_${PN} = "xterm"
-RRECOMMENDS_${PN} = "pointercal-xinput"
Signature · 7 lines
1.7.6.5


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

Quoted 6 lines · Martin Jansa
Quoted 1 line · Andreas Müller

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After

So the plan to replace pointercal-xinput in BSP layers
is to convert pointercal.xinput files to 99-<device>.conf files provided by xserver-xf86-conf bbappend?

I would have appended it to xinput-calibrator because that's where the configuration files are used. I can put them also to xserver-xf86-conf bbappend - have no strong opinion here.

Quoted 4 lines

And do you have some script to convert them or do you convert them manually?

I wanted to convert them manually but a script is more reliable - will do that next week.

Andreas

#7 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

Quoted 10 lines · Andreas Müller
Quoted 6 lines · Martin Jansa
Quoted 1 line · Andreas Müller

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After

So the plan to replace pointercal-xinput in BSP layers
is to convert pointercal.xinput files to 99-<device>.conf files provided by xserver-xf86-conf bbappend?

I would have appended it to xinput-calibrator because that's where the configuration files are used. I can put them also to xserver-xf86-conf bbappend - have no strong opinion here.

xinput-calibrator does not need to be MACHINE_ARCH, that's why they were in separate pointercal-xinput before.

xserver-xf86-config on other hand is usually MACHINE_ARCH so it would be better to add them there.

Or create new recipe for them and RDEPEND it from xinput-calibrator...

Quoted 12 lines
Quoted 3 lines

And do you have some script to convert them or do you convert them manually?

I wanted to convert them manually but a script is more reliable - will do that next week.

Andreas

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#8 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

Quoted 12 lines · Martin Jansa
Quoted 10 lines · Andreas Müller
Quoted 6 lines · Martin Jansa
Quoted 1 line · Andreas Müller

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After

So the plan to replace pointercal-xinput in BSP layers
is to convert pointercal.xinput files to 99-<device>.conf files provided by xserver-xf86-conf bbappend?

I would have appended it to xinput-calibrator because that's where the configuration files are used. I can put them also to xserver-xf86-conf bbappend - have no strong opinion here.

Quoted 7 lines

xinput-calibrator does not need to be MACHINE_ARCH, that's why they were in separate pointercal-xinput before.

xserver-xf86-config on other hand is usually MACHINE_ARCH so it would be better to add them there.

Or create new recipe for them and RDEPEND it from xinput-calibrator...

Or don't remove pointercal-xinput :)

Andreas

#9 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

In reply to Andreas Müller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 3 lines

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After this is accepted patches to layers appending pointercal-xinput will be send.

How does this work with board where you can plug in different touchscreen (like beaglebone) or difference touchscreen controllers (beagleboard, olimex allwinner boards, etc)?

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE3tvMkyGM64RGpERAiSbAJ9lhIi1jSmhhM9UIePDIzICyQlTLQCfWgyi oh3uluQd0wpW/61WheXTrz4=
=FYL8
-----END PGP SIGNATURE-----

#10 lore raw

Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove

Quoted 12 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 3 lines

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After this is accepted patches to layers appending pointercal-xinput will be send.

How does this work with board where you can plug in different touchscreen (like beaglebone) or difference touchscreen controllers (beagleboard, olimex allwinner boards, etc)?

Each device gets an conf-file named by the name of the device. An example file I took from my gumstix:

Section "InputClass"

	Identifier	"calibration"
	MatchProduct	"ADS7846 Touchscreen"
	Option	"Calibration"	"96 3935 3591 98"
	Option	"SwapAxes"	"0"

EndSection

For devices with different name it works fine. I have no solution yet for connecting multiple touchscreen devices of same device name - similar to your use-case connecting different touchscreens on same controller. There a manual recalibration has to be started which now stores the data persistent (if the operator has the right to write to /etc/X11/xorg.conf.d).

Andreas

#11 lore raw

PATCH 5/5 xinput-calibrator: do not RDEPEND xterm

In reply to Andreas Müller

This does not break automatic calibration (at first start or plugin of new device). For manual recalibration we assume a terminal is installed and avoid multiple terminals for most images.

---
 .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +1 -2
index 8ef774b..d2c40e2 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 inherit autotools
 
@@ -57,4 +57,3 @@ do_install_append() {
 }
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
-RDEPENDS_${PN} = "xterm"
Signature · 1 line
1.7.6.5
#12 lore raw

Re: [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 3 lines

This does not break automatic calibration (at first start or plugin of new device). For manual recalibration we assume a terminal is installed and avoid multiple terminals for most images.

I ran into this a while ago, if you use GNOME, it will use xdg-utils to launch the terminal, which wasn't installed in my system. I'm not sure where I'd need to add the xdg-utils RDEPENDS to make it all work properly, any suggestions?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE30UMkyGM64RGpERAqH/AJwOoKZTDX7el9o022dYnnETU5mUKACdFJ0X HbT3Dk3QSbUzt4AoxskglvQ=
=aBd+
-----END PGP SIGNATURE-----

#13 lore raw
In reply to Andreas Müller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 23 lines

* Implemented are 3 modes of invocation: 1. udev/systemd 2. /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES containing systemd or not

* The calibration is stored in /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for multiple touchsceen devices is prepared.

* The script detects upon parameter information how it was called and waits for xserver to come up / detect connected touchsceen devices. If no matching calibration file is found, the xinput_calibrator is called for this device. For systemd invocation the default display is choosen.

* For manual invocation and multiple touchscreen devices attached, the operator can select which device to calibrate interactively.

* Multiple touchscreen support is prepared - the following open issues are known: * Multiple touchscreens with same device name will get same calibration values. An unique device identifier could not be found yet. * systemd startup with multiple device cause multiple instances of xinput_calibrator being started without information for which device the calibration is performed.

Quoted 5 lines

* Many many tests were performed: 2 automatic invocation types * (1st + 2nd startup) * (0, 1, 2 touchscreens)

* Other layers need alignment for pointercal removement. If accepted I can take care (this is NOT an extortion :)

At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie is actually the same Tias who maintains xinput-calibrator. Long story short:
we should send all out patches upstream and he'll have a look at them. He is a big fan of the xorg conf snippet that this patchset introduces. In the long term I think we'll need to see how well the 'tagging' of the evdev itself with the calibration value is working. I looked at it a few years ago and it didn't work for our usecases, but that might have changed. THat should make non-X apps work as well (e.g. QT/e).

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE3y1MkyGM64RGpERAnfeAKC7FF+MGpDJXCr3hZ9f4HHbQUi3YgCgrrmZ 5UqAi0nnN/7uZ2X0v2x6acU=
=iaR5
-----END PGP SIGNATURE-----

#14 lore raw
Quoted 30 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 26 lines

* Implemented are 3 modes of invocation: 1. udev/systemd 2. /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES containing systemd or not

* The calibration is stored in /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for multiple touchsceen devices is prepared.

* The script detects upon parameter information how it was called and waits for xserver to come up / detect connected touchsceen devices. If no matching calibration file is found, the xinput_calibrator is called for this device. For systemd invocation the default display is choosen.

* For manual invocation and multiple touchscreen devices attached, the operator can select which device to calibrate interactively.

* Multiple touchscreen support is prepared - the following open issues are known: * Multiple touchscreens with same device name will get same calibration values. An unique device identifier could not be found yet. * systemd startup with multiple device cause multiple instances of xinput_calibrator being started without information for which device the calibration is performed.

* Many many tests were performed: 2 automatic invocation types * (1st + 2nd startup) * (0, 1, 2 touchscreens)

Quoted 7 lines
Quoted 2 lines

* Other layers need alignment for pointercal removement. If accepted I can take care (this is NOT an extortion :)

At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie is actually the same Tias who maintains xinput-calibrator. Long story short:
we should send all out patches upstream and he'll have a look at them. He is a big fan of the xorg conf snippet that this patchset introduces.

I will append the script/udev-rule/systemd service to the patchset. With the systemd/udev stuff I would like to wait a bit until our users have collected experience. After sending this series I saw that on some images at first start xinput-calibrator is hidden by the greeter application of dm. Up to now I did not yet find a good way to have xinput_calibrator 'always on top'.

Andreas

#15 lore raw
Quoted 38 lines · Andreas Müller
Quoted 30 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:

Quoted 26 lines

* Implemented are 3 modes of invocation: 1. udev/systemd 2. /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES containing systemd or not

* The calibration is stored in /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for multiple touchsceen devices is prepared.

* The script detects upon parameter information how it was called and waits for xserver to come up / detect connected touchsceen devices. If no matching calibration file is found, the xinput_calibrator is called for this device. For systemd invocation the default display is choosen.

* For manual invocation and multiple touchscreen devices attached, the operator can select which device to calibrate interactively.

* Multiple touchscreen support is prepared - the following open issues are known: * Multiple touchscreens with same device name will get same calibration values. An unique device identifier could not be found yet. * systemd startup with multiple device cause multiple instances of xinput_calibrator being started without information for which device the calibration is performed.

* Many many tests were performed: 2 automatic invocation types * (1st + 2nd startup) * (0, 1, 2 touchscreens)

Quoted 7 lines
Quoted 2 lines

* Other layers need alignment for pointercal removement. If accepted I can take care (this is NOT an extortion :)

At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie is actually the same Tias who maintains xinput-calibrator. Long story short:
we should send all out patches upstream and he'll have a look at them. He is a big fan of the xorg conf snippet that this patchset introduces.

Quoted 8 lines

I will append the script/udev-rule/systemd service to the patchset. With the systemd/udev stuff I would like to wait a bit until our users have collected experience. After sending this series I saw that on some images at first start xinput-calibrator is hidden by the greeter application of dm. Up to now I did not yet find a good way to have xinput_calibrator 'always on top'.

Andreas

After using this solution for a while I see the following issues:

1. User rights: Currently only users with write permission on /etc/X11/xorg.conf.d/ can make the calibration permanent. This can be avoided by a single calibration file for all devices which is owned by a new group 'touchcal'. Nice side effect: A single file reduces the modifications on pointercal-xinput (for shipping default calibration values).
2. udev/systemd invocation: On some of my images the display manager's greeter starts after touchscreen_calibration and thereby hides it. Since systemd cannot help me here, I think about a workaround like
this: If xinput_calibrator detects that it loses focus, it pushes itself back to top. To avoid dead-loops in case the other application follows same strategy the maximum number of regaining the focus is limited to e.g 3.
3. Multiple instances of devices with same device-name / different touch devices on same controller: Have no idea how to give X this additional information.

My suggestion:

I will rework for 1+2. This leads to a much better solution than we have currently. For 3 I am open on suggestions.

Andreas