osd: support window switcher with thumbnails

The new-style window switcher can be enabled with
<windowSwitcher style="thumbnail">.

New theme entries:

osd.window-switcher.style-thumbnail.width.max: 80%
osd.window-switcher.style-thumbnail.padding: 4
osd.window-switcher.style-thumbnail.item.width: 300
osd.window-switcher.style-thumbnail.item.height: 250
osd.window-switcher.style-thumbnail.item.padding: 10
osd.window-switcher.style-thumbnail.item.active.border.width: 2
osd.window-switcher.style-thumbnail.item.active.border.color: #589bda
osd.window-switcher.style-thumbnail.item.active.bg.color: #c7e2fc
osd.window-switcher.style-thumbnail.item.icon.size: 60
This commit is contained in:
tokyo4j 2025-08-08 14:53:34 +09:00 committed by Johan Malm
parent 6e2805f692
commit 2e9292b7a3
13 changed files with 434 additions and 5 deletions

View file

@ -265,7 +265,16 @@ update_osd(struct server *server)
struct wl_array views;
wl_array_init(&views);
view_array_append(server, &views, rc.window_switcher.criteria);
struct osd_impl *osd_impl = &osd_classic_impl;
struct osd_impl *osd_impl = NULL;
switch (rc.window_switcher.style) {
case WINDOW_SWITCHER_CLASSIC:
osd_impl = &osd_classic_impl;
break;
case WINDOW_SWITCHER_THUMBNAIL:
osd_impl = &osd_thumbnail_impl;
break;
}
if (!wl_array_len(&views) || !server->osd_state.cycle_view) {
osd_finish(server);