mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-11-17 07:48:28 +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) {
|
static bool test_mark(struct sway_container *container, void *mark) {
|
||||||
if (container->marks->length) {
|
if (container->marks->length) {
|
||||||
return !list_seq_find(container->marks,
|
return list_seq_find(container->marks,
|
||||||
(int (*)(const void *, const void *))strcmp, mark);
|
(int (*)(const void *, const void *))strcmp, mark) != -1;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue