evdev: drop the button count when releasing keys on remove
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 20 Aug 2014 01:11:28 +0000 (11:11 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 01:31:23 +0000 (11:31 +1000)
commitbd7f7e8a08777ae3f9b9097a38ca666b948c9b3a
treec08f812bcf9646dd463133823e4e2b422dc9b460
parent20831877d001936e017f8d1f38c6cda49367d5dc
evdev: drop the button count when releasing keys on remove

We previously called this function only before device removal, so failing to
update the button state didn't matter. To make this function generic for the
device suspend/resume, we need to keep track of the button/key count properly.

If we have a key down multiple times on suspend though, log a bug.
The dispatch should release the keys before we even get here (functionality
added in a subsequent patch).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev.c