input: extract function

This commit is contained in:
Jens Peters 2024-06-04 20:11:32 +02:00 committed by Johan Malm
parent 3dd4bc7c3b
commit ebe81ac591
3 changed files with 17 additions and 5 deletions

View file

@ -11,6 +11,19 @@
#include "input/tablet-tool.h"
#include "labwc.h"
bool
tablet_tool_has_focused_surface(struct seat *seat)
{
struct drawing_tablet_tool *tool;
wl_list_for_each(tool, &seat->tablet_tools, link) {
if (tool->tool_v2->focused_surface) {
return true;
}
}
return false;
}
static void
handle_set_cursor(struct wl_listener *listener, void *data)
{