wayland: destroy cursor theme when removing pointer capability

This commit is contained in:
Daniel Eklöf 2020-07-10 19:32:48 +02:00
parent 5677df629e
commit 1c13061f35
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -192,8 +192,12 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
wl_pointer_release(seat->wl_pointer);
wl_surface_destroy(seat->pointer.surface);
if (seat->pointer.theme != NULL)
wl_cursor_theme_destroy(seat->pointer.theme);
seat->wl_pointer = NULL;
seat->pointer.surface = NULL;
seat->pointer.theme = NULL;
seat->pointer.cursor = NULL;
}
}