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

@ -45,6 +45,7 @@ struct window_switcher_field {
struct buf;
struct view;
struct server;
struct wlr_scene_node;
/* Begin window switcher */
void osd_begin(struct server *server, enum lab_cycle_dir direction);
@ -58,6 +59,9 @@ void osd_finish(struct server *server, bool switch_focus);
/* Notify OSD about a destroying view */
void osd_on_view_destroy(struct view *view);
/* Focus the clicked window and close OSD */
void osd_on_cursor_release(struct server *server, struct wlr_scene_node *node);
/* Used by osd.c internally to render window switcher fields */
void osd_field_get_content(struct window_switcher_field *field,
struct buf *buf, struct view *view);