[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#511987: marked as done (xserver-xorg-input-evtouch: patch to support LEO 8800)



Your message dated Tue, 11 May 2010 14:54:03 +0200
with message-id <20100511125403.GA5650@radis.liafa.jussieu.fr>
and subject line Re: Bug#511987: xserver-xorg-input-evtouch: patch to support LEO 8800
has caused the Debian Bug report #511987,
regarding xserver-xorg-input-evtouch: patch to support LEO 8800
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 owner@bugs.debian.org
immediately.)


-- 
511987: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511987
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xserver-xorg-input-evtouch
Version: 0.8.7-3
Severity: normal
Tags: patch


The patch below allows evtouch to work with the LEO 8800 touch screen
controller.

Quortech's open source packages are available at:
  ftp://ftp.quortech.com/eclipse/deb-packages

xf86-input-evtouch_0.8.7-3quortech3.dsc includes this patch.


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-14-generic
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)

*** quortech-absolute-code.patch
# Description: This patch adapts evtouch to certain touch screen
#   controllers (such as LEO 8800) that give their absolute position
#   with the high bit set in the code.
#
# Changes
#   o EVTouchProcessAbs() : Simplified and reworked to handle normal
#     and codes with high bit set.
#
# Feel free to send comments, critics, suggestions to wuth@acm.org To
# apply simply change into the toplevel directory of the source to be
# modified and enter: patch -p1 < <PATH_TO_PATCH>
# 
# All patches are available under the GNU GPL, I hope they might be
# useful for you (-:
# - Brett Wuth
#
Index: xf86-input-evtouch-0.8.7/evtouch.c
===================================================================
--- xf86-input-evtouch-0.8.7.orig/evtouch.c	2009-01-15 14:14:33.000000000 -0700
+++ xf86-input-evtouch-0.8.7/evtouch.c	2009-01-15 14:14:36.000000000 -0700
@@ -342,46 +342,61 @@
         }
 }
 
+
 void EVTouchProcessAbs(EVTouchPrivatePtr priv)
 {
-        struct input_event *ev; /* packet being/just read */
-
-        ev = &priv->ev;
+  struct input_event *ev; /* packet being/just read */
 
-        if ( (ev->code == ABS_X) || (ev->code == ABS_Z) ) {
-	        dbg_loc( &ev->value, NULL, NULL, NULL );
+  ev = &priv->ev;
 
- 		if ((priv->cur_x - ev->value < priv->move_limit)
-                        && (priv->cur_x - ev->value > -priv->move_limit))
-                        return;
-                priv->cur_x = ev->value;
-//		libtouchSetXPos(priv->libtouch, priv->cur_x);
+  switch (ev->code) {
+    /* At least one touch screen controller (LEO 8800) produces
+     * messages with bit 1 of the code turned on.  So instead of ABS
+     * we get ABS_X|0x2 and instead of ABS_Y we get ABS_Y|0x2.  These
+     * are normally the codes for ABS_Z and ABS_RX respectively.  Not
+     * sure whether this is A/ a bug in the controller, B/ a bug in
+     * the kernel driver, or C/ a change in the definition of the code
+     * value.  We check for either value.
+     */
+  case ABS_X:
+  case ABS_X|0x2:
+    dbg_loc( &ev->value, NULL, NULL, NULL );
+
+    if ((priv->cur_x - ev->value < priv->move_limit)
+	&& (priv->cur_x - ev->value > -priv->move_limit))
+      return;
+    priv->cur_x = ev->value;
+    //libtouchSetXPos(priv->libtouch, priv->cur_x);
+    break;
+
+  case ABS_Y:
+  case ABS_Y|0x2:
+    dbg_loc( NULL, &ev->value, NULL, NULL );
+
+    if ((priv->cur_y - ev->value < priv->move_limit)
+	&& (priv->cur_y - ev->value > -priv->move_limit))
+      return;
+    priv->cur_y = ev->value;
+    // libtouchSetYPos(priv->libtouch, priv->cur_y);
+    break;
+
+  case ABS_WHEEL:
+    {
+      LocalDevicePtr local = priv->local;
+      if (ev->value > 0) {
+	for (; ev->value > 0; ev->value--) {
+	  PostButtonEvent (local, 4,1,priv->cur_x,priv->cur_y);
+	  PostButtonEvent (local, 4,0,priv->cur_x,priv->cur_y);
 	}
-
-        if ( (ev->code == ABS_Y) || (ev->code == ABS_RX) ) {
-	        dbg_loc( NULL, &ev->value, NULL, NULL );
-
-		if ((priv->cur_y - ev->value < priv->move_limit)
-                        && (priv->cur_y - ev->value > -priv->move_limit))
-                        return;
-                priv->cur_y = ev->value;
-//		libtouchSetYPos(priv->libtouch, priv->cur_y);
-	}
-
-	if (ev->code == ABS_WHEEL) {
-		LocalDevicePtr local = priv->local;
-		if (ev->value > 0) {
-			for (; ev->value > 0; ev->value--) {
-				PostButtonEvent (local, 4,1,priv->cur_x,priv->cur_y);
-				PostButtonEvent (local, 4,0,priv->cur_x,priv->cur_y);
-			}
-		} else if (ev->value < 0) {
-			for (ev->value = -ev->value; ev->value > 0; ev->value--) {
-				PostButtonEvent (local, 5,1,priv->cur_x,priv->cur_y);
-				PostButtonEvent (local, 5,0,priv->cur_x,priv->cur_y);
-			}
-		}
+      } else if (ev->value < 0) {
+	for (ev->value = -ev->value; ev->value > 0; ev->value--) {
+	  PostButtonEvent (local, 5,1,priv->cur_x,priv->cur_y);
+	  PostButtonEvent (local, 5,0,priv->cur_x,priv->cur_y);
 	}
+      }
+    }
+    break;
+  }
 }
 
 



--- End Message ---
--- Begin Message ---
On Wed, Feb  4, 2009 at 13:29:55 +0100, Julien Cristau wrote:

> On Thu, 2009-01-15 at 19:04 -0700, Brett Wuth wrote:
> > *** quortech-absolute-code.patch
> > # Description: This patch adapts evtouch to certain touch screen
> > #   controllers (such as LEO 8800) that give their absolute position
> > #   with the high bit set in the code.
> > #
> > # Changes
> > #   o EVTouchProcessAbs() : Simplified and reworked to handle normal
> > #     and codes with high bit set.
> > #
> 
> Hi Brett,
> 
> the existing code does this already, as far as I can tell.  It checks
> for ABS_X or ABS_Z for the x axis, and ABS_Y or ABS_RX for the y axis.
> Why is your patch necessary on top of that? (the code rework and
> whitespace changes that are also in this patch make it hard to see the
> real changes, if any)
> 
No reply, closing this bug.  Thanks for your report.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: