David L wrote:
I sent this to the general xfree86 mailing list but received no responses. I think there is a bug with the elographics driver:
[snip]

Hi David,
    This is a bug in xf86Elo.c (or a bug that I personaly fixed
in a local copy of that file).

    The problem is that this driver reads exactly one packet from the
port every time the driver's ReadInput function is called, so if
the server revieves a third SIGIO before the input module has finished
posting events for the first packet, then we are exactly one packet
out of sync. It is possible for a mouse module to adapt the same
functionality without visible errors because mouse coordinates are
relative, but touchscreen coordinates are absolute.

    My patch is significantly outdated, essentialy my fix is to loop
over serial packets untill no data is readable on the port instead
of assuming one packet (although I guess it may be more appropriate
to drop all packets except the last one on the port; to avoid possibly
useless spamming).


At a glance, this piece of code in current CVS: (ReadInput method) =============================================== /* * Try to get a packet. */ if (xf86EloGetPacket(priv->packet_buf, &priv->packet_buf_p, &priv->checksum, local->fd) != Success) { return; } ===============================================

Can be changed to:
===============================================
  while (xf86EloGetPacket(priv->packet_buf,
                       &priv->packet_buf_p,
                       &priv->checksum,
                       local->fd) == Success) {
     /*
        Code body
      */
===============================================


Good luck! -Tristan


_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel

Reply via email to