[PATCH libinput 6/8] evdev: drop the button count when releasing keys on remove
Jonas Ådahl
jadahl at gmail.com
Thu Aug 21 12:22:41 PDT 2014
On Wed, Aug 20, 2014 at 01:18:54PM +1000, Peter Hutterer wrote:
> 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.hutterer at 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,
This might not necessarily result in a key event is queued as it would
only do so if the count reaches 0. I think right now, as the 'touchpad:
Only break out of tap FSM for clickpad button presses' patch has not
been applied, we only ever have one concurrent button press with the
same code, so it the problem won't show.
> time,
> code,
> LIBINPUT_KEY_STATE_RELEASED);
> break;
> case EVDEV_KEY_TYPE_BUTTON:
> - pointer_notify_button(
> - &device->base,
> + evdev_pointer_notify_button(
> + device,
Same as above.
Jonas
> time,
> code,
> LIBINPUT_BUTTON_STATE_RELEASED);
> --
> 1.9.3
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list