Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
input-method: keyboard grab: fix listener not removed if destoryed by
Browse files Browse the repository at this point in the history
resource destroy
  • Loading branch information
xdavidwu committed Nov 14, 2019
1 parent 8b6668d commit d0aa634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/wlr_input_method_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ static void im_keyboard_grab_modifiers(struct wlr_seat_keyboard_grab *grab,

static void im_keyboard_grab_cancel(struct wlr_seat_keyboard_grab *grab) {
struct wlr_input_method_keyboard_grab_v2 *im_keyboard_grab = grab->data;
wl_list_remove(&im_keyboard_grab->keymap_listener.link);
wl_list_remove(&im_keyboard_grab->repeat_info_listener.link);
if (im_keyboard_grab->grabbed) {
im_keyboard_grab->grabbed = false;
struct wl_resource *resource = im_keyboard_grab->resource;
wl_list_remove(&im_keyboard_grab->keymap_listener.link);
wl_list_remove(&im_keyboard_grab->repeat_info_listener.link);
im_keyboard_grab_destroy(im_keyboard_grab);
wl_resource_set_user_data(resource, NULL);
}
Expand Down

0 comments on commit d0aa634

Please sign in to comment.