Hi, I think bug 523749 should be fixed in lenny, would you accept an update? diff follows, two changes backported from upstream 1.2.3. Without this change the X server hangs waiting for input from the device. Two users reported success with the patched package. Cheers, Julien debian/changelog | 10 ++++++++++ src/xf86Elo.c | 29 +++++++++++++++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3777b05..3073fca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +xserver-xorg-input-elographics (1:1.2.1-2) stable; urgency=low + + * Apply two fixes from upstream: + - WaitForInput before trying to xf86EloGetPacket. + - Don't convert coordinates for servers 1.4 and above. + This should prevent the X server from getting stuck when using the + touchscreen (closes: #523749). + + -- Julien Cristau <jcristau@debian.org> Sat, 30 Jan 2010 01:36:23 +0100 + xserver-xorg-input-elographics (1:1.2.1-1) unstable; urgency=low * New upstream release. diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 2a76849..71547a6 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -790,7 +790,7 @@ xf86EloReadInput(LocalDevicePtr local) EloPrivatePtr priv = (EloPrivatePtr)(local->private); int cur_x, cur_y; int state; -#ifdef XFREE86_V4 +#if GET_ABI_MAJOR(XINPUT_ABI) == 0 int first = 0; /* since convert is expecting 0 */ int num = 2; /* since convert is expecting 0 */ int v0 = 0; /* = cur_x - based on the debug output this is what v0 is */ @@ -799,18 +799,19 @@ xf86EloReadInput(LocalDevicePtr local) int v3 = 0; /* not used in convert */ int v4 = 0; /* not used in convert */ int v5 = 0; /* not used in convert */ - int x; /* output */ - int y; /* output */ #endif DBG(4, ErrorF("Entering ReadInput\n")); /* * Try to get a packet. */ - while (xf86EloGetPacket(priv->packet_buf, + while (xf86WaitForInput(local->fd, ELO_MAX_WAIT/100) > 0) { + if(xf86EloGetPacket(priv->packet_buf, &priv->packet_buf_p, &priv->checksum, - local->fd) == Success) { + local->fd) != Success) + break; + /* * Process only ELO_TOUCHs here. */ @@ -822,30 +823,30 @@ xf86EloReadInput(LocalDevicePtr local) cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]); state = priv->packet_buf[2] & 0x07; +#if GET_ABI_MAJOR(XINPUT_ABI) == 0 /* * MHALAS: Based on the description in xf86XInputSetScreen * this code must be called from ReadInput BEFORE any events * are posted but this method is called FROM xf86PostMotionEvent * Therefore I have moved this method into xf86EloReadInput */ -#ifdef XFREE86_V4 /* * Need to check if still on the correct screen. * This call is here so that this work can be done after * calib and before posting the event. */ - DBG(3, ErrorF("EloConvert Before Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); + DBG(3, ErrorF("EloConvert Before Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); v0 = cur_x; /* based on the debug output this is what v0 is */ - v1 = cur_y; /* based on the debug output this is what v0 is */ + v1 = cur_y; /* based on the debug output this is what v1 is */ /* * Use the conversion method to send correct coordinates * since it contains all necessary logic */ - xf86EloConvert(local, first, num, v0, v1, v2, v3, v4, v5, &x, &y); - DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); - xf86XInputSetScreen(local, priv->screen_no, x, y); - DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, x, y)); + xf86EloConvert(local, first, num, v0, v1, v2, v3, v4, v5, &cur_x, &cur_y); + DBG(3, ErrorF("EloConvert During Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); + xf86XInputSetScreen(local, priv->screen_no, cur_x, cur_y); + DBG(3, ErrorF("EloConvert After Fix: Screen(%d) - x(%d), y(%d)\n", priv->screen_no, cur_x, cur_y)); #endif /* @@ -855,13 +856,13 @@ xf86EloReadInput(LocalDevicePtr local) * location has changed as DIX assumes this. This is why we always * emit a motion, regardless of the kind of packet processed. */ - xf86PostMotionEvent(local->dev, TRUE, 0, 2, x, y); + xf86PostMotionEvent(local->dev, TRUE, 0, 2, cur_x, cur_y); /* * Emit a button press or release. */ if (state == ELO_PRESS || state == ELO_RELEASE) { - xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, x, y); + xf86PostButtonEvent(local->dev, TRUE, 1, state == ELO_PRESS, 0, 2, cur_x, cur_y); } DBG(3, ErrorF("TouchScreen: x(%d), y(%d), %s\n",
Attachment:
signature.asc
Description: Digital signature