input: Reset pointer state when last pointer device was removed

Reset pointer button count in case the driver did not emit appropriate
number of number button released events.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
dev
Jonas Ådahl 11 years ago committed by Kristian Høgsberg
parent cbfa7f7b22
commit 3e12e63f03
  1. 7
      src/input.c

@ -431,6 +431,12 @@ pointer_handle_sprite_destroy(struct wl_listener *listener, void *data)
pointer->sprite = NULL;
}
static void
weston_pointer_reset_state(struct weston_pointer *pointer)
{
pointer->button_count = 0;
}
WL_EXPORT struct weston_pointer *
weston_pointer_create(struct weston_seat *seat)
{
@ -2013,6 +2019,7 @@ weston_seat_release_pointer(struct weston_seat *seat)
if (pointer->sprite)
pointer_unmap_sprite(pointer);
weston_pointer_reset_state(pointer);
seat_send_updated_caps(seat);
}
}

Loading…
Cancel
Save