osd: generalize osd_{classic,thumbnail}_item

This allows us to share common codes for dealing with osd items.
For example:
- Get the clicked osd item to focus its associated window
- Scroll the items when their total height is taller than output height
This commit is contained in:
tokyo4j 2025-10-30 02:51:05 +09:00 committed by Johan Malm
parent 747163fa3e
commit 00f0a46ef7
6 changed files with 43 additions and 31 deletions

View file

@ -500,7 +500,7 @@ handle_new_output(struct wl_listener *listener, void *data)
wl_signal_add(&wlr_output->events.request_state, &output->request_state);
wl_list_init(&output->regions);
wl_array_init(&output->osd_scene.items);
wl_list_init(&output->osd_scene.items);
/*
* Create layer-trees (background, bottom, top and overlay) and