From 0797c0035b83ee5ceaa87f0153ec1f500528b647 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 31 May 2013 15:16:57 +1000 Subject: [PATCH] Add a FIXME for lack of O_NONBLOCK Signed-off-by: Peter Hutterer --- libevdev/libevdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c index 9ce626f..b2ae094 100644 --- a/libevdev/libevdev.c +++ b/libevdev/libevdev.c @@ -548,6 +548,10 @@ int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_e queue_shift_multiple(dev, dev->queue_nsync, NULL); } + /* FIXME: check for O_NONBLOCK and if not set, skip if we have an + * event in the queue from the previous read. + */ + /* Always read in some more events. Best case this smoothes over a potential SYN_DROPPED, worst case we don't read fast enough and end up with SYN_DROPPED anyway */ rc = read_more_events(dev);