Use "cycle" instead of "osd" across the codebase

We were using the word "osd" to describe the window switcher, but it can
be used with on-screen display (OSD) disabled by
`<windowSwitcher><osd show="false">`. Let's use "cycle" instead to avoid
confusion.
This commit is contained in:
tokyo4j 2025-11-29 02:41:54 +09:00 committed by Hiroaki Yamamoto
parent 65cc2e40ba
commit 4fcb873f6f
21 changed files with 265 additions and 266 deletions

View file

@ -204,11 +204,11 @@ static const struct field_converter field_converter[LAB_FIELD_COUNT] = {
[LAB_FIELD_TITLE] = { 'T', field_set_title },
[LAB_FIELD_TITLE_SHORT] = { 't', field_set_title_short },
/* fmt_char can never be matched so prevents LAB_FIELD_CUSTOM recursion */
[LAB_FIELD_CUSTOM] = { '\0', osd_field_set_custom },
[LAB_FIELD_CUSTOM] = { '\0', cycle_osd_field_set_custom },
};
void
osd_field_set_custom(struct buf *buf, struct view *view, const char *format)
cycle_osd_field_set_custom(struct buf *buf, struct view *view, const char *format)
{
if (!format) {
wlr_log(WLR_ERROR, "Missing format for custom window switcher field");
@ -286,7 +286,7 @@ reset_format:
}
void
osd_field_arg_from_xml_node(struct window_switcher_field *field,
cycle_osd_field_arg_from_xml_node(struct cycle_osd_field *field,
const char *nodename, const char *content)
{
if (!strcmp(nodename, "content")) {
@ -332,7 +332,7 @@ osd_field_arg_from_xml_node(struct window_switcher_field *field,
}
bool
osd_field_is_valid(struct window_switcher_field *field)
cycle_osd_field_is_valid(struct cycle_osd_field *field)
{
if (field->content == LAB_FIELD_NONE) {
wlr_log(WLR_ERROR, "Invalid OSD field: no content set");
@ -350,7 +350,7 @@ osd_field_is_valid(struct window_switcher_field *field)
}
void
osd_field_get_content(struct window_switcher_field *field,
cycle_osd_field_get_content(struct cycle_osd_field *field,
struct buf *buf, struct view *view)
{
if (field->content == LAB_FIELD_NONE) {
@ -363,7 +363,7 @@ osd_field_get_content(struct window_switcher_field *field,
}
void
osd_field_free(struct window_switcher_field *field)
cycle_osd_field_free(struct cycle_osd_field *field)
{
zfree(field->format);
zfree(field);