From f9b6aa307974a51a0b80d4bfec99caa066e6e2db Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 3 Mar 2022 13:23:08 -0500 Subject: backend/wayland: give wlr_keyboard ownership to wlr_wl_seat --- include/backend/wayland.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'include/backend') diff --git a/include/backend/wayland.h b/include/backend/wayland.h index 668b69ae..20484cef 100644 --- a/include/backend/wayland.h +++ b/include/backend/wayland.h @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -112,23 +113,29 @@ struct wlr_wl_pointer { }; struct wlr_wl_seat { + char *name; struct wl_seat *wl_seat; - struct wl_list link; // wlr_wl_backend.seats - char *name; + struct wlr_wl_backend *backend; + + struct wl_keyboard *wl_keyboard; + struct wlr_keyboard wlr_keyboard; + struct wl_touch *touch; struct wl_pointer *pointer; - struct wl_keyboard *keyboard; - struct wlr_wl_backend *backend; struct wlr_wl_pointer *active_pointer; + + struct wl_list link; // wlr_wl_backend.seats }; struct wlr_wl_backend *get_wl_backend_from_backend(struct wlr_backend *backend); void update_wl_output_cursor(struct wlr_wl_output *output); struct wlr_wl_pointer *pointer_get_wl(struct wlr_pointer *wlr_pointer); + +void init_seat_keyboard(struct wlr_wl_seat *seat); + void create_wl_pointer(struct wlr_wl_seat *seat, struct wlr_wl_output *output); -void create_wl_keyboard(struct wlr_wl_seat *seat); void create_wl_touch(struct wlr_wl_seat *seat); struct wlr_wl_input_device *create_wl_input_device( struct wlr_wl_seat *seat, enum wlr_input_device_type type); @@ -138,6 +145,7 @@ void destroy_wl_input_device(struct wlr_wl_input_device *dev); void destroy_wl_buffer(struct wlr_wl_buffer *buffer); extern const struct wl_seat_listener seat_listener; + extern const struct wlr_tablet_pad_impl tablet_pad_impl; extern const struct wlr_tablet_impl tablet_impl; -- cgit v1.2.3