Your message dated Tue, 23 Dec 2008 10:02:06 +0000
with message-id <[email protected]>
and subject line Bug#501139: fixed in xf86-input-tslib 0.0.5-3
has caused the Debian Bug report #501139,
regarding xserver-xorg-input-tslib: Does not handle button release events 
correctly
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.)


-- 
501139: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501139
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xserver-xorg-input-tslib
Version: 0.0.5-1
Severity: normal
Tags: patch

When the variance module is enabled in ts.conf, the tslib input driver will
emit a ButtonRelease event only when the pen is pressed the next time.  This
is because the variance module caches samples and will produce two samples on
a release event, but the input driver is only prepared to receive one sample
each time there is data available in the fd.  A solution is to open the
touchscreen in non-blocking mode and read as long as samples are available.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26.2 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- xf86-input-tslib-0.0.5/src/tslib.c	2008-08-19 09:48:11.000000000 +0300
+++ xf86-input-tslib-0.0.5.mod/src/tslib.c	2008-10-04 00:29:23.000000000 +0300
@@ -123,52 +123,50 @@
 	int ret;
 	int x,y;
 
-	ret = ts_read(priv->ts, &samp, 1);
+	while((ret = ts_read(priv->ts, &samp, 1)) == 1) {
+		if(samp.pressure) {
+			int tmp_x = samp.x;
+
+			switch(priv->rotate) {
+			case TSLIB_ROTATE_CW:	samp.x = samp.y;
+						samp.y = priv->width - tmp_x;
+						break;
+			case TSLIB_ROTATE_UD:	samp.x = priv->width - samp.x;
+						samp.y = priv->height - samp.y;
+						break;
+			case TSLIB_ROTATE_CCW:	samp.x = priv->height - samp.y;
+						samp.y = tmp_x;
+						break;
+			default:		break;
+			}
+
+			priv->lastx = samp.x;
+			priv->lasty = samp.y;
+			x = samp.x;
+			y = samp.y;
+
+			xf86XInputSetScreen(local, priv->screen_num,
+					samp.x,
+					samp.y);
 
-	if (ret < 0) {
-		ErrorF("ts_read failed\n");
-		return;
-	}
+			xf86PostMotionEvent (local->dev, TRUE, 0, 2,
+					x, y);
 
-//	ErrorF("%ld.%06ld: %6d %6d %6d\n", samp.tv.tv_sec, samp.tv.tv_usec, samp.x, samp.y, samp.pressure);
-
-	if(samp.pressure) {
-		int tmp_x = samp.x;
-
-		switch(priv->rotate) {
-		case TSLIB_ROTATE_CW:	samp.x = samp.y;
-					samp.y = priv->width - tmp_x;
-					break;
-		case TSLIB_ROTATE_UD:	samp.x = priv->width - samp.x;
-					samp.y = priv->height - samp.y;
-					break;
-		case TSLIB_ROTATE_CCW:	samp.x = priv->height - samp.y;
-					samp.y = tmp_x;
-					break;
-		default:		break;
 		}
 
-		priv->lastx = samp.x;
-		priv->lasty = samp.y;
-		x = samp.x;
-		y = samp.y;
-
-		xf86XInputSetScreen(local, priv->screen_num,
-				samp.x,
-				samp.y);
-
-		xf86PostMotionEvent (local->dev, TRUE, 0, 2,
-				x, y);
+		if(!!priv->lastp != !!samp.pressure) {
+			priv->lastp = samp.pressure;
 
+			xf86PostButtonEvent(local->dev, TRUE,
+				1, !!samp.pressure, 0, 2,
+				priv->lastx,
+				priv->lasty);
+		}
 	}
 
-	if(priv->lastp != samp.pressure) {
-		priv->lastp = samp.pressure;
-
-		xf86PostButtonEvent(local->dev, TRUE,
-			1, !!samp.pressure, 0, 2,
-			priv->lastx,
-			priv->lasty);
+	if (ret < 0) {
+		ErrorF("ts_read failed\n");
+		return;
 	}
 
 }
@@ -183,7 +181,7 @@
 {
 	InputInfoPtr pInfo;
 	unsigned char map[MAXBUTTONS + 1];
-	int i;
+	int i, axiswidth, axisheight;
 	struct ts_priv *priv;
 
 	ErrorF("%s\n", __FUNCTION__);
@@ -212,17 +210,29 @@
 			return !Success;
 		}
 
+		switch(priv->rotate) {
+		case TSLIB_ROTATE_CW:
+		case TSLIB_ROTATE_CCW:
+			axiswidth = priv->height;
+			axisheight = priv->width;
+			break;
+		default:
+			axiswidth = priv->width;
+			axisheight = priv->height;
+			break;
+		}
+
 		InitValuatorAxisStruct(device, 0, 0,    	/* min val */
-					       priv->width - 1,	/* max val */
-					       priv->width,	/* resolution */
+					       axiswidth - 1,	/* max val */
+					       axiswidth,	/* resolution */
 					       0,		/* min_res */
-					       priv->width);	/* max_res */
+					       axiswidth);	/* max_res */
 
 		InitValuatorAxisStruct(device, 1, 0,    	/* min val */
-					       priv->height - 1,/* max val */
-					       priv->height,	/* resolution */
+					       axisheight - 1,	/* max val */
+					       axisheight,	/* resolution */
 					       0,		/* min_res */
-					       priv->height);	/* max_res */
+					       axisheight);	/* max_res */
 
 		if (InitProximityClassDeviceStruct (device) == FALSE) {
 			ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
@@ -336,7 +346,7 @@
 
 	s = xf86SetStrOption(pInfo->options, "TslibDevice", NULL);
 
-	priv->ts = ts_open(s, 0);
+	priv->ts = ts_open(s, 1);
 	if (!priv->ts) {
 		ErrorF("ts_open failed (device=%s)\n",s);
 		return NULL;

--- End Message ---
--- Begin Message ---
Source: xf86-input-tslib
Source-Version: 0.0.5-3

We believe that the bug you reported is fixed in the latest version of
xf86-input-tslib, which is due to be installed in the Debian FTP archive:

xf86-input-tslib_0.0.5-3.diff.gz
  to pool/main/x/xf86-input-tslib/xf86-input-tslib_0.0.5-3.diff.gz
xf86-input-tslib_0.0.5-3.dsc
  to pool/main/x/xf86-input-tslib/xf86-input-tslib_0.0.5-3.dsc
xserver-xorg-input-tslib_0.0.5-3_amd64.deb
  to pool/main/x/xf86-input-tslib/xserver-xorg-input-tslib_0.0.5-3_amd64.deb



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.
Wen-Yen Chuang <[email protected]> (supplier of updated xf86-input-tslib 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: SHA1

Format: 1.8
Date: Tue, 23 Dec 2008 12:23:45 +0800
Source: xf86-input-tslib
Binary: xserver-xorg-input-tslib
Architecture: source amd64
Version: 0.0.5-3
Distribution: experimental
Urgency: low
Maintainer: Wen-Yen Chuang <[email protected]>
Changed-By: Wen-Yen Chuang <[email protected]>
Description: 
 xserver-xorg-input-tslib - tslib touchscreen driver for X.Org/XFree86 server
Closes: 501139
Changes: 
 xf86-input-tslib (0.0.5-3) experimental; urgency=low
 .
   * Downgrade Build-Depends to libts-dev (>= 1.0-4)
   * Update to latest xsfbs (http://git.debian.org/git/pkg-xorg/xsfbs.git)
 .
 xf86-input-tslib (0.0.5-2) experimental; urgency=low
 .
   * Build against libts-dev (>= 1.0-5)
   * Update to latest xsfbs
   * Fix button release events handling (Closes: #501139)
     Thanks to Mikko Rasa.
   * Support dynamic resolution, thanks to Graeme Gregory
   * Support automatic device detection, thanks to Markku Vire
     - add Recommends: hal
     - include 10-x11-input-tslib.fdi
Checksums-Sha1: 
 539b61e1e011438c11c0f4c3dd827f1e1dd20f51 1175 xf86-input-tslib_0.0.5-3.dsc
 7dad4781c04504f330d9e52efd21d831f29c4552 17484 xf86-input-tslib_0.0.5-3.diff.gz
 323d3a65ff948057e3968ddaea26316f4ade6865 9510 
xserver-xorg-input-tslib_0.0.5-3_amd64.deb
Checksums-Sha256: 
 6e70663c486fb0537f00bcff0ff8cd3c012663e0e446a76bfa2e9c8c007f9b18 1175 
xf86-input-tslib_0.0.5-3.dsc
 c81aec211382af110faeeca49f591fe40f69767519e0f455628279ec159bc864 17484 
xf86-input-tslib_0.0.5-3.diff.gz
 2494ed3979b57b6771d813c73271db8dcf66423b61e63c269c27af594937684f 9510 
xserver-xorg-input-tslib_0.0.5-3_amd64.deb
Files: 
 9e328b8d62ab4ea3fe0e775133843bb6 1175 x11 optional xf86-input-tslib_0.0.5-3.dsc
 25b6e903fc9163c9eed5e6225f77368c 17484 x11 optional 
xf86-input-tslib_0.0.5-3.diff.gz
 2b32baf2713dfca7abb89ed031cb8450 9510 x11 optional 
xserver-xorg-input-tslib_0.0.5-3_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklQspAACgkQiAEJSii8s+PhQwCgo37DpfGzBD5gSWFVLiC0i7Rl
b/8AoOHQ6KZY4KP6njNNYdj/A2//tg/6
=zwbD
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to