mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
wlr_seat: add destroy signal
This commit is contained in:
parent
61b91a5721
commit
58488ec5ce
2 changed files with 6 additions and 0 deletions
|
@ -207,6 +207,8 @@ struct wlr_seat {
|
||||||
|
|
||||||
struct wl_signal selection;
|
struct wl_signal selection;
|
||||||
struct wl_signal primary_selection;
|
struct wl_signal primary_selection;
|
||||||
|
|
||||||
|
struct wl_signal destroy;
|
||||||
} events;
|
} events;
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
|
|
|
@ -348,6 +348,8 @@ void wlr_seat_destroy(struct wlr_seat *wlr_seat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_signal_emit(&wlr_seat->events.destroy, NULL);
|
||||||
|
|
||||||
wl_list_remove(&wlr_seat->display_destroy.link);
|
wl_list_remove(&wlr_seat->display_destroy.link);
|
||||||
|
|
||||||
struct wlr_seat_client *client, *tmp;
|
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_begin);
|
||||||
wl_signal_init(&wlr_seat->events.touch_grab_end);
|
wl_signal_init(&wlr_seat->events.touch_grab_end);
|
||||||
|
|
||||||
|
wl_signal_init(&wlr_seat->events.destroy);
|
||||||
|
|
||||||
wlr_seat->display_destroy.notify = handle_display_destroy;
|
wlr_seat->display_destroy.notify = handle_display_destroy;
|
||||||
wl_display_add_destroy_listener(display, &wlr_seat->display_destroy);
|
wl_display_add_destroy_listener(display, &wlr_seat->display_destroy);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue