mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 15:36:29 +01:00
cmd_swap: fix test_mark condition
The condition in test_mark was checking the negation of list_seq_find. This works fine for the first mark, but fails for every other mark. This fixes the condition to check for anything other than -1, which is the value returned from list_seq_find for index not found.
This commit is contained in:
parent
47763c99f9
commit
7999845357
1 changed files with 2 additions and 2 deletions
|
@ -202,8 +202,8 @@ static bool test_id(struct sway_container *container, void *data) {
|
|||
|
||||
static bool test_mark(struct sway_container *container, void *mark) {
|
||||
if (container->marks->length) {
|
||||
return !list_seq_find(container->marks,
|
||||
(int (*)(const void *, const void *))strcmp, mark);
|
||||
return list_seq_find(container->marks,
|
||||
(int (*)(const void *, const void *))strcmp, mark) != -1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue