aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/types/wlr_seat.h2
-rw-r--r--types/wlr_seat.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index f7dea52f..e049d4c7 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -207,6 +207,8 @@ struct wlr_seat {
struct wl_signal selection;
struct wl_signal primary_selection;
+
+ struct wl_signal destroy;
} events;
void *data;
diff --git a/types/wlr_seat.c b/types/wlr_seat.c
index 2a79f784..40143723 100644
--- a/types/wlr_seat.c
+++ b/types/wlr_seat.c
@@ -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);