evdev: Ignore key/button release events if key was never pressed
authorJonas Ådahl <jadahl@gmail.com>
Sun, 27 Jul 2014 13:43:59 +0000 (15:43 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 18 Aug 2014 20:35:19 +0000 (22:35 +0200)
commitc8017595fcb9fafd15c2c638c55f72f389da411a
tree621567b6e1c76be8bdf727c95ed92d61bcac8885
parent100ba70e873b8ed7a6f0b90e9c63687f799664a7
evdev: Ignore key/button release events if key was never pressed

The kernel may send a 'release' event without ever having sent a key
'pressed' event in case the key was pressed before libinput was
initiated. Ignore these events so that we always guarantee a release
event always comes after a pressed event for any given key or button.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/evdev.c
src/evdev.h
src/libinput-util.h
src/libinput.h
test/keyboard.c