mirror of
https://github.com/labwc/labwc.git
synced 2026-03-11 05:33:49 -04:00
input: handle tablet tool creation internally
No need anymore to expose this function.
This commit is contained in:
parent
6f6fcbc2e1
commit
bdd1b8dc60
2 changed files with 3 additions and 4 deletions
|
|
@ -49,7 +49,6 @@ struct drawing_tablet {
|
||||||
void tablet_init(struct seat *seat);
|
void tablet_init(struct seat *seat);
|
||||||
void tablet_finish(struct seat *seat);
|
void tablet_finish(struct seat *seat);
|
||||||
void tablet_create(struct seat *seat, struct wlr_input_device *wlr_input_device);
|
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);
|
bool tablet_tool_has_focused_surface(struct seat *seat);
|
||||||
|
|
||||||
#endif /* LABWC_TABLET_H */
|
#endif /* LABWC_TABLET_H */
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ handle_tablet_tool_destroy(struct wl_listener *listener, void *data)
|
||||||
free(tool);
|
free(tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static struct drawing_tablet_tool *
|
||||||
tablet_tool_create(struct seat *seat,
|
tablet_tool_create(struct seat *seat,
|
||||||
struct wlr_tablet_tool *wlr_tablet_tool)
|
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;
|
tool->handlers.destroy.notify = handle_tablet_tool_destroy;
|
||||||
|
|
||||||
wl_list_insert(&seat->tablet_tools, &tool->link);
|
wl_list_insert(&seat->tablet_tools, &tool->link);
|
||||||
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum motion
|
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
|
* Unfortunately `wlr_tool` is only present in the events, so
|
||||||
* use proximity for creating a `wlr_tablet_v2_tablet_tool`.
|
* use proximity for creating a `wlr_tablet_v2_tablet_tool`.
|
||||||
*/
|
*/
|
||||||
tablet_tool_create(tablet->seat, ev->tool);
|
tool = tablet_tool_create(tablet->seat, ev->tool);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue