diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h index 72d3abd3..4483a578 100644 --- a/include/wlr/types/wlr_tablet_v2.h +++ b/include/wlr/types/wlr_tablet_v2.h @@ -253,6 +253,8 @@ void wlr_tablet_tool_v2_end_grab(struct wlr_tablet_v2_tablet_tool *tool); void wlr_tablet_tool_v2_start_implicit_grab(struct wlr_tablet_v2_tablet_tool *tool); +bool wlr_tablet_tool_v2_has_implicit_grab( + struct wlr_tablet_v2_tablet_tool *tool); uint32_t wlr_send_tablet_v2_tablet_pad_enter( struct wlr_tablet_v2_tablet_pad *pad, diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c index c5fe15a7..7cb5b7e9 100644 --- a/types/tablet_v2/wlr_tablet_v2_tool.c +++ b/types/tablet_v2/wlr_tablet_v2_tool.c @@ -822,13 +822,14 @@ static const struct wlr_tablet_tool_v2_grab_interface .cancel = implicit_tool_cancel, }; -static bool tool_has_implicit_grab(struct wlr_tablet_v2_tablet_tool *tool) { +bool wlr_tablet_tool_v2_has_implicit_grab( + struct wlr_tablet_v2_tablet_tool *tool) { return tool->grab->interface == &implicit_tool_grab_interface; } void wlr_tablet_tool_v2_start_implicit_grab( struct wlr_tablet_v2_tablet_tool *tool) { - if (tool_has_implicit_grab(tool) || !tool->focused_surface) { + if (wlr_tablet_tool_v2_has_implicit_grab(tool) || !tool->focused_surface) { return; }