osd: allow clicking an osd item to focus the window

This commit is contained in:
tokyo4j 2025-10-30 03:22:45 +09:00 committed by Johan Malm
parent 00f0a46ef7
commit 9197eb468a
9 changed files with 55 additions and 1 deletions

View file

@ -59,6 +59,15 @@ node_menuitem_from_node(struct wlr_scene_node *wlr_scene_node)
return (struct menuitem *)node_descriptor->data;
}
struct osd_item *
node_osd_item_from_node(struct wlr_scene_node *wlr_scene_node)
{
assert(wlr_scene_node->data);
struct node_descriptor *node_descriptor = wlr_scene_node->data;
assert(node_descriptor->type == LAB_NODE_OSD_ITEM);
return (struct osd_item *)node_descriptor->data;
}
struct ssd_button *
node_try_ssd_button_from_node(struct wlr_scene_node *wlr_scene_node)
{