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

@ -144,6 +144,16 @@ osd_on_view_destroy(struct view *view)
}
}
void
osd_on_cursor_release(struct server *server, struct wlr_scene_node *node)
{
assert(server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER);
struct osd_item *item = node_osd_item_from_node(node);
server->osd_state.cycle_view = item->view;
osd_finish(server, /*switch_focus*/ true);
}
static void
restore_preview_node(struct server *server)
{