mirror of
https://github.com/X11Libre/xf86-input-elographics.git
synced 2026-03-24 01:34:03 +00:00
WaitForInput before trying to xf86EloGetPacket. #14109
Followup to 72408c2404.
This patch isn't perfect yet, usage of O_NONBLOCK would be preferred and some
better error handling for incomplete packages, but at least it's less broken
than without this patch.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
X.Org Bug 14109 <http://bugs.freedesktop.org/show_bug.cgi?id=14109>
This commit is contained in:
committed by
Peter Hutterer
parent
929b723521
commit
086e9d2056
@@ -807,10 +807,13 @@ xf86EloReadInput(LocalDevicePtr local)
|
||||
/*
|
||||
* Try to get a packet.
|
||||
*/
|
||||
while (xf86EloGetPacket(priv->packet_buf,
|
||||
while (xf86WaitForInput(local->fd, ELO_MAX_WAIT) > 0) {
|
||||
if(xf86EloGetPacket(priv->packet_buf,
|
||||
&priv->packet_buf_p,
|
||||
&priv->checksum,
|
||||
local->fd) == Success) {
|
||||
local->fd) != Success)
|
||||
break;
|
||||
|
||||
/*
|
||||
* Process only ELO_TOUCHs here.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user