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 */
free(tool);
}
-void
+static struct drawing_tablet_tool *
tablet_tool_create(struct seat *seat,
struct wlr_tablet_tool *wlr_tablet_tool)
{
tool->handlers.destroy.notify = handle_tablet_tool_destroy;
wl_list_insert(&seat->tablet_tools, &tool->link);
+ return tool;
}
static enum motion
* 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);
}
/*