types/wlr_keyboard: remove destroy event

The destroy event from the base wlr_input_device must be used
This commit is contained in:
Simon Zeni 2022-03-08 15:53:21 -05:00 committed by Kirill Primak
parent 7a2c96dcbd
commit eae8952e17
4 changed files with 2 additions and 6 deletions

View file

@ -89,7 +89,6 @@ struct wlr_keyboard {
struct wl_signal modifiers; struct wl_signal modifiers;
struct wl_signal keymap; struct wl_signal keymap;
struct wl_signal repeat_info; struct wl_signal repeat_info;
struct wl_signal destroy;
} events; } events;
void *data; void *data;

View file

@ -410,7 +410,7 @@ void wlr_input_method_keyboard_grab_v2_set_keyboard(
&keyboard_grab->keyboard_repeat_info); &keyboard_grab->keyboard_repeat_info);
keyboard_grab->keyboard_destroy.notify = keyboard_grab->keyboard_destroy.notify =
handle_keyboard_destroy; handle_keyboard_destroy;
wl_signal_add(&keyboard->events.destroy, wl_signal_add(&keyboard->base.events.destroy,
&keyboard_grab->keyboard_destroy); &keyboard_grab->keyboard_destroy);
wlr_input_method_keyboard_grab_v2_send_modifiers(keyboard_grab, wlr_input_method_keyboard_grab_v2_send_modifiers(keyboard_grab,

View file

@ -124,7 +124,6 @@ void wlr_keyboard_init(struct wlr_keyboard *kb,
wl_signal_init(&kb->events.modifiers); wl_signal_init(&kb->events.modifiers);
wl_signal_init(&kb->events.keymap); wl_signal_init(&kb->events.keymap);
wl_signal_init(&kb->events.repeat_info); wl_signal_init(&kb->events.repeat_info);
wl_signal_init(&kb->events.destroy);
kb->keymap_fd = -1; kb->keymap_fd = -1;
@ -147,8 +146,6 @@ void wlr_keyboard_finish(struct wlr_keyboard *kb) {
wlr_keyboard_notify_key(kb, &event); // updates num_keycodes wlr_keyboard_notify_key(kb, &event); // updates num_keycodes
} }
wlr_signal_emit_safe(&kb->events.destroy, kb);
wlr_input_device_finish(&kb->base); wlr_input_device_finish(&kb->base);
/* Finish xkbcommon resources */ /* Finish xkbcommon resources */

View file

@ -279,7 +279,7 @@ bool wlr_keyboard_group_add_keyboard(struct wlr_keyboard_group *group,
wl_signal_add(&keyboard->events.repeat_info, &device->repeat_info); wl_signal_add(&keyboard->events.repeat_info, &device->repeat_info);
device->repeat_info.notify = handle_keyboard_repeat_info; device->repeat_info.notify = handle_keyboard_repeat_info;
wl_signal_add(&keyboard->events.destroy, &device->destroy); wl_signal_add(&keyboard->base.events.destroy, &device->destroy);
device->destroy.notify = handle_keyboard_destroy; device->destroy.notify = handle_keyboard_destroy;
struct wlr_keyboard *group_kb = &group->keyboard; struct wlr_keyboard *group_kb = &group->keyboard;