diff --git a/include/config/rcxml.h b/include/config/rcxml.h index edfb9e55..65b07172 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -185,7 +185,7 @@ struct rcxml { struct { bool show; enum cycle_osd_style style; - enum cycle_osd_output_criteria output_criteria; + enum cycle_output_filter output_filter; char *thumbnail_label_format; struct wl_list fields; /* struct cycle_osd_field.link */ } osd; diff --git a/include/config/types.h b/include/config/types.h index 99c5929e..540f609f 100644 --- a/include/config/types.h +++ b/include/config/types.h @@ -117,10 +117,10 @@ enum cycle_osd_style { CYCLE_OSD_STYLE_THUMBNAIL, }; -enum cycle_osd_output_criteria { - CYCLE_OSD_OUTPUT_ALL, - CYCLE_OSD_OUTPUT_CURSOR, - CYCLE_OSD_OUTPUT_FOCUSED, +enum cycle_output_filter { + CYCLE_OUTPUT_ALL, + CYCLE_OUTPUT_CURSOR, + CYCLE_OUTPUT_FOCUSED, }; #endif /* LABWC_CONFIG_TYPES_H */ diff --git a/src/config/rcxml.c b/src/config/rcxml.c index bb868fb2..68c1135a 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -1231,11 +1231,11 @@ entry(xmlNode *node, char *nodename, char *content) } } else if (!strcasecmp(nodename, "output.osd.windowSwitcher")) { if (!strcasecmp(content, "all")) { - rc.window_switcher.osd.output_criteria = CYCLE_OSD_OUTPUT_ALL; + rc.window_switcher.osd.output_filter = CYCLE_OUTPUT_ALL; } else if (!strcasecmp(content, "cursor")) { - rc.window_switcher.osd.output_criteria = CYCLE_OSD_OUTPUT_CURSOR; + rc.window_switcher.osd.output_filter = CYCLE_OUTPUT_CURSOR; } else if (!strcasecmp(content, "focused")) { - rc.window_switcher.osd.output_criteria = CYCLE_OSD_OUTPUT_FOCUSED; + rc.window_switcher.osd.output_filter = CYCLE_OUTPUT_FOCUSED; } else { wlr_log(WLR_ERROR, "Invalid windowSwitcher output '%s': " "should be one of all|focused|cursor", content); @@ -1486,7 +1486,7 @@ rcxml_init(void) rc.window_switcher.osd.show = true; rc.window_switcher.osd.style = CYCLE_OSD_STYLE_CLASSIC; - rc.window_switcher.osd.output_criteria = CYCLE_OSD_OUTPUT_ALL; + rc.window_switcher.osd.output_filter = CYCLE_OUTPUT_ALL; rc.window_switcher.osd.thumbnail_label_format = xstrdup("%T"); rc.window_switcher.preview = true; rc.window_switcher.outlines = true; diff --git a/src/cycle/cycle.c b/src/cycle/cycle.c index a775f78c..f14bff9d 100644 --- a/src/cycle/cycle.c +++ b/src/cycle/cycle.c @@ -309,18 +309,18 @@ init_cycle(struct server *server) if (rc.window_switcher.osd.show) { /* Create OSD */ - switch (rc.window_switcher.osd.output_criteria) { - case CYCLE_OSD_OUTPUT_ALL: { + switch (rc.window_switcher.osd.output_filter) { + case CYCLE_OUTPUT_ALL: { struct output *output; wl_list_for_each(output, &server->outputs, link) { create_osd_on_output(output); } break; } - case CYCLE_OSD_OUTPUT_CURSOR: + case CYCLE_OUTPUT_CURSOR: create_osd_on_output(output_nearest_to_cursor(server)); break; - case CYCLE_OSD_OUTPUT_FOCUSED: { + case CYCLE_OUTPUT_FOCUSED: { struct output *output; if (server->active_view) { output = server->active_view->output;