osd: add thumbnailLabelFormat to windowSwitcher (#3187)
Some checks failed
labwc.github.io / notify (push) Has been cancelled

This commit adds `<windowSwitcher thumbnailLabelFormat="%T">` to configure the label text in each item in the thumbnail-style window switcher. Its format follows `<fields><field content="custom" format="">`.
This commit is contained in:
elviosak 2025-11-05 06:23:15 -03:00 committed by GitHub
parent 8b950350ed
commit c8167c8ee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 34 additions and 21 deletions

View file

@ -1208,6 +1208,8 @@ entry(xmlNode *node, char *nodename, char *content)
} else if (!strcasecmp(content, "thumbnail")) {
rc.window_switcher.style = WINDOW_SWITCHER_THUMBNAIL;
}
} else if (!strcasecmp(nodename, "thumbnailLabelFormat.windowSwitcher")) {
xstrdup_replace(rc.window_switcher.thumbnail_label_format, content);
} else if (!strcasecmp(nodename, "preview.windowSwitcher")) {
set_bool(content, &rc.window_switcher.preview);
} else if (!strcasecmp(nodename, "outlines.windowSwitcher")) {
@ -1429,6 +1431,7 @@ rcxml_init(void)
rc.window_switcher.show = true;
rc.window_switcher.style = WINDOW_SWITCHER_CLASSIC;
rc.window_switcher.thumbnail_label_format = xstrdup("%T");
rc.window_switcher.preview = true;
rc.window_switcher.outlines = true;
rc.window_switcher.unshade = true;
@ -1905,6 +1908,7 @@ rcxml_finish(void)
zfree(rc.fallback_app_icon_name);
zfree(rc.workspace_config.prefix);
zfree(rc.tablet.output_name);
zfree(rc.window_switcher.thumbnail_label_format);
clear_title_layout();