mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Fix #1291
This commit is contained in:
parent
eb7b920303
commit
6271abd644
2 changed files with 18 additions and 4 deletions
|
|
@ -434,10 +434,18 @@ static void container_match_add(swayc_t *container, struct list_tokens *list_tok
|
|||
list_add(list_tokens->list, container);
|
||||
}
|
||||
}
|
||||
|
||||
list_t *container_for(list_t *tokens) {
|
||||
struct list_tokens list_tokens = (struct list_tokens){create_list(), tokens};
|
||||
|
||||
container_map(&root_container, (void (*)(swayc_t *, void *))container_match_add, &list_tokens);
|
||||
|
||||
for (int i = 0; i < scratchpad->length; ++i) {
|
||||
swayc_t *c = scratchpad->items[i];
|
||||
if (criteria_test(c, tokens)) {
|
||||
list_add(list_tokens.list, c);
|
||||
}
|
||||
}
|
||||
|
||||
return list_tokens.list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue