mirror of
https://github.com/swaywm/sway.git
synced 2025-11-23 06:59:48 -05:00
parent
3c1fc00f12
commit
51143a75af
8 changed files with 72 additions and 3 deletions
|
|
@ -359,6 +359,16 @@ void free_criteria(struct criteria *crit) {
|
|||
free(crit);
|
||||
}
|
||||
|
||||
bool criteria_any(swayc_t *cont, list_t *criteria) {
|
||||
for (int i = 0; i < criteria->length; i++) {
|
||||
struct criteria *bc = criteria->items[i];
|
||||
if (criteria_test(cont, bc->tokens)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
list_t *criteria_for(swayc_t *cont) {
|
||||
list_t *criteria = config->criteria, *matches = create_list();
|
||||
for (int i = 0; i < criteria->length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue