From 8427749dd06b52bd8e53539f264a784beca9bb6f Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 12 Aug 2017 01:16:12 +0200 Subject: wayland backend: emit signal for input/output removal --- include/backend/wayland.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/backend') diff --git a/include/backend/wayland.h b/include/backend/wayland.h index e6339a23..1ce4e135 100644 --- a/include/backend/wayland.h +++ b/include/backend/wayland.h @@ -33,13 +33,14 @@ struct wlr_output_state { struct wlr_output *wlr_output; struct wl_surface *surface; struct wl_shell_surface *shell_surface; - struct wl_egl_window* egl_window; - struct wl_callback* frame_callback; + struct wl_egl_window *egl_window; + struct wl_callback *frame_callback; void *egl_surface; }; struct wlr_input_device_state { - struct wlr_backend_state* backend; + struct wlr_backend_state *backend; + struct wlr_input_device *wlr_device; void *resource; }; -- cgit v1.2.3 From 3ea878b76e7cf63caf9cddaaabe2faca053d9085 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 12 Aug 2017 01:19:45 +0200 Subject: wayland backend: free seatName --- backend/wayland/backend.c | 1 + backend/wayland/wl_seat.c | 1 + include/backend/wayland.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/backend') diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index 1a156802..ddad1418 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -85,6 +85,7 @@ static void wlr_wl_backend_destroy(struct wlr_backend_state *state) { list_free(state->devices); list_free(state->outputs); + free(state->seatName); wlr_egl_free(&state->egl); if (state->seat) wl_seat_destroy(state->seat); diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index 88784828..7fb63cbe 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -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) { struct wlr_backend_state *state = data; assert(state->seat == wl_seat); + // Do we need to check if seatName was previously set for name change? state->seatName = strdup(name); } diff --git a/include/backend/wayland.h b/include/backend/wayland.h index 1ce4e135..be96128e 100644 --- a/include/backend/wayland.h +++ b/include/backend/wayland.h @@ -25,7 +25,7 @@ struct wlr_backend_state { struct wl_shell *shell; struct wl_shm *shm; struct wl_seat *seat; - const char *seatName; + char *seatName; }; struct wlr_output_state { -- cgit v1.2.3