input: handle tablet tool creation internally

No need anymore to expose this function.
This commit is contained in:
Jens Peters 2025-06-10 19:40:48 +02:00 committed by Johan Malm
parent 6f6fcbc2e1
commit bdd1b8dc60
2 changed files with 3 additions and 4 deletions

View file

@ -49,7 +49,6 @@ struct drawing_tablet {
void tablet_init(struct seat *seat);
void tablet_finish(struct seat *seat);
void tablet_create(struct seat *seat, struct wlr_input_device *wlr_input_device);
void tablet_tool_create(struct seat *seat, struct wlr_tablet_tool *wlr_tablet_tool);
bool tablet_tool_has_focused_surface(struct seat *seat);
#endif /* LABWC_TABLET_H */

View file

@ -66,7 +66,7 @@ handle_tablet_tool_destroy(struct wl_listener *listener, void *data)
free(tool);
}
void
static struct drawing_tablet_tool *
tablet_tool_create(struct seat *seat,
struct wlr_tablet_tool *wlr_tablet_tool)
{
@ -89,6 +89,7 @@ tablet_tool_create(struct seat *seat,
tool->handlers.destroy.notify = handle_tablet_tool_destroy;
wl_list_insert(&seat->tablet_tools, &tool->link);
return tool;
}
static enum motion
@ -330,8 +331,7 @@ handle_tablet_tool_proximity(struct wl_listener *listener, void *data)
* Unfortunately `wlr_tool` is only present in the events, so
* use proximity for creating a `wlr_tablet_v2_tablet_tool`.
*/
tablet_tool_create(tablet->seat, ev->tool);
return;
tool = tablet_tool_create(tablet->seat, ev->tool);
}
/*