wlr_seat: add destroy signal

master
Dominique Martinet 7 years ago
parent 61b91a5721
commit 58488ec5ce

@ -207,6 +207,8 @@ struct wlr_seat {
struct wl_signal selection;
struct wl_signal primary_selection;
struct wl_signal destroy;
} events;
void *data;

@ -348,6 +348,8 @@ void wlr_seat_destroy(struct wlr_seat *wlr_seat) {
return;
}
wl_signal_emit(&wlr_seat->events.destroy, NULL);
wl_list_remove(&wlr_seat->display_destroy.link);
struct wlr_seat_client *client, *tmp;
@ -453,6 +455,8 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
wl_signal_init(&wlr_seat->events.touch_grab_begin);
wl_signal_init(&wlr_seat->events.touch_grab_end);
wl_signal_init(&wlr_seat->events.destroy);
wlr_seat->display_destroy.notify = handle_display_destroy;
wl_display_add_destroy_listener(display, &wlr_seat->display_destroy);

Loading…
Cancel
Save