diff options
Diffstat (limited to 'sway/criteria.c')
-rw-r--r-- | sway/criteria.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 706da04f..ee6d4d1c 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -23,17 +23,16 @@ enum criteria_type { // *must* keep in sync with criteria_strings[] | |||
23 | CRIT_LAST | 23 | CRIT_LAST |
24 | }; | 24 | }; |
25 | 25 | ||
26 | // this *must* match the ordering in criteria_type enum | 26 | static const char * const criteria_strings[CRIT_LAST] = { |
27 | static const char * const criteria_strings[] = { | 27 | [CRIT_CLASS] = "class", |
28 | "class", | 28 | [CRIT_CON_MARK] = "con_mark", |
29 | "con_mark", | 29 | [CRIT_ID] = "id", |
30 | "id", | 30 | [CRIT_INSTANCE] = "instance", |
31 | "instance", | 31 | [CRIT_TITLE] = "title", |
32 | "title", | 32 | [CRIT_URGENT] = "urgent", // either "latest" or "oldest" ... |
33 | "urgent", // either "latest" or "oldest" ... | 33 | [CRIT_WINDOW_ROLE] = "window_role", |
34 | "window_role", | 34 | [CRIT_WINDOW_TYPE] = "window_type", |
35 | "window_type", | 35 | [CRIT_WORKSPACE] = "workspace" |
36 | "workspace" | ||
37 | }; | 36 | }; |
38 | 37 | ||
39 | /** | 38 | /** |
@@ -240,7 +239,7 @@ ect_cleanup: | |||
240 | } | 239 | } |
241 | 240 | ||
242 | static int regex_cmp(const char *item, const pcre *regex) { | 241 | static int regex_cmp(const char *item, const pcre *regex) { |
243 | return pcre_exec(regex, NULL, item, strlen(item), 0, 0, NULL, 0); | 242 | return pcre_exec(regex, NULL, item, strlen(item), 0, 0, NULL, 0); |
244 | } | 243 | } |
245 | 244 | ||
246 | // test a single view if it matches list of criteria tokens (all of them). | 245 | // test a single view if it matches list of criteria tokens (all of them). |