From 56f7c000b540b929bbdb0111b91108b1651924e6 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Tue, 8 Mar 2022 09:33:58 -0500 Subject: backend/wayland/tablet_v2: give wlr_tablet_* ownership to wlr_wl_seat --- include/backend/wayland.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'include/backend') diff --git a/include/backend/wayland.h b/include/backend/wayland.h index e07daa4f..d683dfca 100644 --- a/include/backend/wayland.h +++ b/include/backend/wayland.h @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include #include @@ -132,6 +134,14 @@ struct wlr_wl_seat { struct wl_touch *wl_touch; struct wlr_touch wlr_touch; + struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2; + struct zwp_tablet_v2 *zwp_tablet_v2; + struct wlr_tablet wlr_tablet; + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2; + struct wlr_tablet_tool wlr_tablet_tool; + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2; + struct wlr_tablet_pad wlr_tablet_pad; + struct wl_list link; // wlr_wl_backend.seats }; @@ -144,6 +154,9 @@ void init_seat_pointer(struct wlr_wl_seat *seat); void finish_seat_pointer(struct wlr_wl_seat *seat); void create_pointer(struct wlr_wl_seat *seat, struct wlr_wl_output *output); +void init_seat_tablet(struct wlr_wl_seat *seat); +void finish_seat_tablet(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); bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl); @@ -154,11 +167,7 @@ void destroy_wl_buffer(struct wlr_wl_buffer *buffer); extern const struct wl_seat_listener seat_listener; extern const struct wlr_pointer_impl wl_pointer_impl; -extern const struct wlr_tablet_pad_impl tablet_pad_impl; -extern const struct wlr_tablet_impl tablet_impl; - -struct wlr_wl_tablet_seat *wl_add_tablet_seat( - struct zwp_tablet_manager_v2 *manager, - struct wlr_wl_seat *seat); +extern const struct wlr_tablet_pad_impl wl_tablet_pad_impl; +extern const struct wlr_tablet_impl wl_tablet_impl; #endif -- cgit v1.2.3