wayland backend: free seatName

This commit is contained in:
Dominique Martinet 2017-08-12 01:19:45 +02:00
parent 8427749dd0
commit 3ea878b76e
3 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,7 @@ static void wlr_wl_backend_destroy(struct wlr_backend_state *state) {
list_free(state->devices); list_free(state->devices);
list_free(state->outputs); list_free(state->outputs);
free(state->seatName);
wlr_egl_free(&state->egl); wlr_egl_free(&state->egl);
if (state->seat) wl_seat_destroy(state->seat); if (state->seat) wl_seat_destroy(state->seat);

View File

@ -258,6 +258,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
static void seat_handle_name(void *data, struct wl_seat *wl_seat, const char *name) { static void seat_handle_name(void *data, struct wl_seat *wl_seat, const char *name) {
struct wlr_backend_state *state = data; struct wlr_backend_state *state = data;
assert(state->seat == wl_seat); assert(state->seat == wl_seat);
// Do we need to check if seatName was previously set for name change?
state->seatName = strdup(name); state->seatName = strdup(name);
} }

View File

@ -25,7 +25,7 @@ struct wlr_backend_state {
struct wl_shell *shell; struct wl_shell *shell;
struct wl_shm *shm; struct wl_shm *shm;
struct wl_seat *seat; struct wl_seat *seat;
const char *seatName; char *seatName;
}; };
struct wlr_output_state { struct wlr_output_state {