Rename cycle_osd_output_criteria to cycle_output_filter

This commit is contained in:
tokyo4j 2025-12-12 03:38:57 +09:00 committed by Johan Malm
parent e2d83ff7f5
commit 64af206114
4 changed files with 13 additions and 13 deletions

View file

@ -185,7 +185,7 @@ struct rcxml {
struct { struct {
bool show; bool show;
enum cycle_osd_style style; enum cycle_osd_style style;
enum cycle_osd_output_criteria output_criteria; enum cycle_output_filter output_filter;
char *thumbnail_label_format; char *thumbnail_label_format;
struct wl_list fields; /* struct cycle_osd_field.link */ struct wl_list fields; /* struct cycle_osd_field.link */
} osd; } osd;

View file

@ -117,10 +117,10 @@ enum cycle_osd_style {
CYCLE_OSD_STYLE_THUMBNAIL, CYCLE_OSD_STYLE_THUMBNAIL,
}; };
enum cycle_osd_output_criteria { enum cycle_output_filter {
CYCLE_OSD_OUTPUT_ALL, CYCLE_OUTPUT_ALL,
CYCLE_OSD_OUTPUT_CURSOR, CYCLE_OUTPUT_CURSOR,
CYCLE_OSD_OUTPUT_FOCUSED, CYCLE_OUTPUT_FOCUSED,
}; };
#endif /* LABWC_CONFIG_TYPES_H */ #endif /* LABWC_CONFIG_TYPES_H */

View file

@ -1231,11 +1231,11 @@ entry(xmlNode *node, char *nodename, char *content)
} }
} else if (!strcasecmp(nodename, "output.osd.windowSwitcher")) { } else if (!strcasecmp(nodename, "output.osd.windowSwitcher")) {
if (!strcasecmp(content, "all")) { 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")) { } 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")) { } 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 { } else {
wlr_log(WLR_ERROR, "Invalid windowSwitcher output '%s': " wlr_log(WLR_ERROR, "Invalid windowSwitcher output '%s': "
"should be one of all|focused|cursor", content); "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.show = true;
rc.window_switcher.osd.style = CYCLE_OSD_STYLE_CLASSIC; 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.osd.thumbnail_label_format = xstrdup("%T");
rc.window_switcher.preview = true; rc.window_switcher.preview = true;
rc.window_switcher.outlines = true; rc.window_switcher.outlines = true;

View file

@ -309,18 +309,18 @@ init_cycle(struct server *server)
if (rc.window_switcher.osd.show) { if (rc.window_switcher.osd.show) {
/* Create OSD */ /* Create OSD */
switch (rc.window_switcher.osd.output_criteria) { switch (rc.window_switcher.osd.output_filter) {
case CYCLE_OSD_OUTPUT_ALL: { case CYCLE_OUTPUT_ALL: {
struct output *output; struct output *output;
wl_list_for_each(output, &server->outputs, link) { wl_list_for_each(output, &server->outputs, link) {
create_osd_on_output(output); create_osd_on_output(output);
} }
break; break;
} }
case CYCLE_OSD_OUTPUT_CURSOR: case CYCLE_OUTPUT_CURSOR:
create_osd_on_output(output_nearest_to_cursor(server)); create_osd_on_output(output_nearest_to_cursor(server));
break; break;
case CYCLE_OSD_OUTPUT_FOCUSED: { case CYCLE_OUTPUT_FOCUSED: {
struct output *output; struct output *output;
if (server->active_view) { if (server->active_view) {
output = server->active_view->output; output = server->active_view->output;