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

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/evdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 74632c8..6bbea92 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1042,15 +1042,15 @@ release_pressed_keys(struct evdev_device *device)
                        case EVDEV_KEY_TYPE_NONE:
                                break;
                        case EVDEV_KEY_TYPE_KEY:
-                               keyboard_notify_key(
-                                       &device->base,
+                               evdev_keyboard_notify_key(
+                                       device,
                                        time,
                                        code,
                                        LIBINPUT_KEY_STATE_RELEASED);
                                break;
                        case EVDEV_KEY_TYPE_BUTTON:
-                               pointer_notify_button(
-                                       &device->base,
+                               evdev_pointer_notify_button(
+                                       device,
                                        time,
                                        code,
                                        LIBINPUT_BUTTON_STATE_RELEASED);
-- 
1.9.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to