Input: evdev - indicate buffer overrun with SYN_DROPPED

Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
events have been dropped from the evdev input buffer due to a
buffer overrun.  The client should use this event as a hint to
reset its state or ignore all following events until the next
packet begins.

Signed-off-by: Jeff Brown <jeffbrown@android.com>
[dtor@mail.ru: Implement Henrik's suggestion and drop old events in
 case of overflow.]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Jeff Brown
2011-04-12 23:29:38 -07:00
committed by Dmitry Torokhov
parent b1e064b81e
commit 9fb0f14e31
3 changed files with 28 additions and 12 deletions

View File

@@ -167,6 +167,7 @@ struct input_keymap_entry {
#define SYN_REPORT 0
#define SYN_CONFIG 1
#define SYN_MT_REPORT 2
#define SYN_DROPPED 3
/*
* Keys and buttons