mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/wayland: handle wl_registry.global_remove for wl_seat
Destroy the struct wlr_wl_seat when the global is removed.
This commit is contained in:
parent
2b5eb0733e
commit
cfa7696d7b
3 changed files with 16 additions and 4 deletions
|
|
@ -233,7 +233,8 @@ void init_seat_touch(struct wlr_wl_seat *seat) {
|
|||
|
||||
static const struct wl_seat_listener seat_listener;
|
||||
|
||||
bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl) {
|
||||
bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl,
|
||||
uint32_t global_name) {
|
||||
struct wlr_wl_seat *seat = calloc(1, sizeof(struct wlr_wl_seat));
|
||||
if (!seat) {
|
||||
wlr_log_errno(WLR_ERROR, "Allocation failed");
|
||||
|
|
@ -241,6 +242,7 @@ bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl) {
|
|||
}
|
||||
seat->wl_seat = wl_seat;
|
||||
seat->backend = wl;
|
||||
seat->global_name = global_name;
|
||||
wl_list_insert(&wl->seats, &seat->link);
|
||||
wl_seat_add_listener(wl_seat, &seat_listener, seat);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue