Your message dated Wed, 17 Feb 2021 14:33:50 +0000
with message-id <[email protected]>
and subject line Bug#776990: fixed in xserver-xorg-input-elographics 1:1.4.2-1
has caused the Debian Bug report #776990,
regarding xserver-xorg-input-elographics: inverted and swapped axes don't work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
776990: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776990
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xserver-xorg-input-elographics
Version: 1:1.4.1-1+fh1
Severity: normal
Tags: upstream patch

Inverted and swapped axes don't work:

- priv->swap_axes is set and never used, so clearly it cannot work.

- Limits are passed to InitValuatorAxisStruct which doesn't work
  (at least) with inverted axes (min > max), see clipAxis():

    /* If a value range is defined, clip. If not, do nothing */
    if (axis->max_value <= axis->min_value)
        return;

- Both things worked in older versions (e.g. squeeze).

- The changes since then even kept a comment
  (/* I will map coordinates myself */)
  which was now wrong and misleading (and is correct again after my
  patch).

- The attached patch restores the respective code from that version.

- The patched code is tested! (Unlike the current code which was
  obviously never tested, see first point.)

- I will have access to suitable touch screens for 1-2 more weeks
  (in case you'd like me to test other changes or so).
--- src/xf86Elo.c
+++ src/xf86Elo.c
@@ -307,6 +307,46 @@
 /*
  ***************************************************************************
  *
+ * xf86EloConvert --
+ *	Convert extended valuators to x and y suitable for core motion
+ *	events. Return True if ok and False if the requested conversion
+ *	can't be done for the specified valuators.
+ *
+ ***************************************************************************
+ */
+static void
+xf86EloConvert(EloPrivatePtr			priv,
+	       int		*x,
+	       int		*y)
+{
+  int		width = priv->max_x - priv->min_x;
+  int		height = priv->max_y - priv->min_y;
+  int		input_x, input_y;
+
+  DBG(3, ErrorF("EloConvert: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, *x, *y));
+
+  if (width == 0) width = 1;
+  if (height == 0) height = 1;
+
+  if (priv->swap_axes) {
+    input_x = *y;
+    input_y = *x;
+  }
+  else {
+    input_x = *x;
+    input_y = *y;
+  }
+  *x = (priv->screen_width * (input_x - priv->min_x)) / width;
+  *y = (priv->screen_height -
+	(priv->screen_height * (input_y - priv->min_y)) / height);
+
+  DBG(3, ErrorF("EloConvert: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, *x, *y));
+}
+
+
+/*
+ ***************************************************************************
+ *
  * xf86EloReadInput --
  *	Read all pending report packets from the touchscreen and enqueue
  *	them.
@@ -360,6 +400,8 @@
           cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]);
           state = priv->packet_buf[2] & 0x07;
 
+          xf86EloConvert(priv, &cur_x, &cur_y);
+
           /*
            * Send events.
            *
@@ -722,14 +764,14 @@
 	/* I will map coordinates myself */
 	InitValuatorAxisStruct(dev, 0,
 			       axis_labels[0],
-			       priv->min_x, priv->max_x,
+			       -1, -1,
 			       9500,
 			       0     /* min_res */,
 			       9500  /* max_res */,
 			       Absolute);
 	InitValuatorAxisStruct(dev, 1,
 			       axis_labels[1],
-			       priv->min_y, priv->max_y,
+			       -1, -1,
 			       10500,
 			       0     /* min_res */,
 			       10500 /* max_res */,

--- End Message ---
--- Begin Message ---
Source: xserver-xorg-input-elographics
Source-Version: 1:1.4.2-1
Done: Adrian Bunk <[email protected]>

We believe that the bug you reported is fixed in the latest version of
xserver-xorg-input-elographics, which is due to be installed in the Debian FTP 
archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adrian Bunk <[email protected]> (supplier of updated 
xserver-xorg-input-elographics package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 17 Feb 2021 15:29:37 +0200
Source: xserver-xorg-input-elographics
Architecture: source
Version: 1:1.4.2-1
Distribution: unstable
Urgency: medium
Maintainer: Adrian Bunk <[email protected]>
Changed-By: Adrian Bunk <[email protected]>
Closes: 776990
Changes:
 xserver-xorg-input-elographics (1:1.4.2-1) unstable; urgency=medium
 .
   * New upstream release.
     - Added axis inversion functionality. (Closes: #776990)
Checksums-Sha1:
 7e3c30615835d722a81c1ccca315f0ded44493ff 1965 
xserver-xorg-input-elographics_1.4.2-1.dsc
 d276b94e5262ecefaa2394b0d8df1f828b45e82d 387189 
xserver-xorg-input-elographics_1.4.2.orig.tar.gz
 8ebc1eaa624829f7c05230ee4e3a0f7cb2a47c68 4719 
xserver-xorg-input-elographics_1.4.2-1.diff.gz
Checksums-Sha256:
 46504c9c16614938568f46dedfb32ea3e5bf61208202829521ecdcb76ca88310 1965 
xserver-xorg-input-elographics_1.4.2-1.dsc
 c9b92ff05a2aaf34afffbcc03bd3bac6c16c6e8c742c22e9be6bb5405c051469 387189 
xserver-xorg-input-elographics_1.4.2.orig.tar.gz
 16c1d1ff89af55b856e273ff2221046fa5e59d8b103afda52563dcf67d1db694 4719 
xserver-xorg-input-elographics_1.4.2-1.diff.gz
Files:
 d8cdfa1f9eb556c1d2360b15bf9e3d64 1965 x11 optional 
xserver-xorg-input-elographics_1.4.2-1.dsc
 39344ad2da099bbd56962dcc8015f9ef 387189 x11 optional 
xserver-xorg-input-elographics_1.4.2.orig.tar.gz
 bf19e69f98af3b85981df637d6038170 4719 x11 optional 
xserver-xorg-input-elographics_1.4.2-1.diff.gz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmAtJIEACgkQiNJCh6LY
mLETVg/+JGvjGPafI8kly/HtoxJPffDYVcNgCuRu55CXrL7uJEKuK09J6QWS6LaY
xgTPGo6jqtpLvgHBB6VXbUKnIuqu28txOrGr5V7aNSwXYus29BRCprnmIIT+YX8n
iEmm5dMoM+fkX2VN71wf64TaoW8JZ1TRGm/niEBiXW+c0zZBibzhHxU7xCxSyoZB
IB1U+WCjE29rDhy3f61ciwzgrvKsyAa84LdFFj8tDUepVUBYVGu8br+5X5leDVex
sMorJ32CXdeRPE7Ihraiu5RJZsWTCqdFwvSQ3fu6yO45UB9/jkqPXCEdTK5ZmnTL
Bp39wGaXa1Q+6lC1oHIZw3zBt9BdBOIrgTqJJe2syfYmwdkMrHmiyD/VTO6jmP77
YoYZpIi0B2zGQSsvufekyU7+gduo4/Ez7R1z8PVnVdEG2YNR+QfnRk3r8I9w9kJ8
1syPoOjJCFolpJaTcGCrW9yqPuTGCh/zSRVJV7iD4pawReneB1eIOrAjvINvIvOq
ObJOg49YRUOItljUArjIxpiCtD0c8EGxzbatETOhmLI8K8FOE6SPdHeTxITRlZcs
GbPDpjoj2WCtGyYvm+C0j6g5tJem+aWbjJpNYqohpZTgEEiwJY+HmLvYAHWLDerm
ZaYrlX9Kpph6sOyqcJMtyt0FkfW+LW8o06qencPKnmj6qfBd0a0=
=Z0xe
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to